[jira] [Created] (FLINK-18342) SQLParser can not parse ROW() if it contains UDF

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-18342) SQLParser can not parse ROW() if it contains UDF

Shang Yuanchun (Jira)
Leonard Xu created FLINK-18342:
----------------------------------

             Summary: SQLParser can not parse ROW() if it contains UDF
                 Key: FLINK-18342
                 URL: https://issues.apache.org/jira/browse/FLINK-18342
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
            Reporter: Leonard Xu


{code:java}
// 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:
     ")" ...
     "," ...
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)