Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18342

SQLParser can not parse ROW() if it contains UDF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Table SQL / Planner
    • None

    Description

      // code to reproduce
      
      CREATE TABLE MyHBaseSource (
        rowkey STRING,
        family1 ROW<f1c1 STRING>,
        family2 ROW<f2c1 STRING, f2c2 STRING>
      ) WITH (
        'connector' = 'hbase-1.4',
        'table-name' = 'source',
        'zookeeper.quorum' = 'localhost:2181',
        'zookeeper.znode.parent' = '/hbase'
      );
      CREATE FUNCTION RegReplace AS 'org.apache.flink.table.toolbox.StringRegexReplaceFunction';
      
      INSERT INTO MyHBaseSink
        SELECT
        rowkey,
        ROW(RegReplace(family1.f1c1, 'v', 'value'))
      FROM MyHBaseSource;
      
      //exception
      [ERROR] Could not execute SQL statement. Reason:
      org.apache.flink.sql.parser.impl.ParseException: Encountered "(" at line 4, column 19.
       Was expecting one of:
           ")" ...
           "," ...
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              leonard Leonard Xu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: