[jira] [Commented] (FLINK-31344) Support to update nested columns in update statement
[ https://issues.apache.org/jira/browse/FLINK-31344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17711306#comment-17711306 ] Aitozi commented on FLINK-31344: [~luoyuxia] I have finished this ticket, could you help take a look when you are free ? > Support to update nested columns in update statement > > > Key: FLINK-31344 > URL: https://issues.apache.org/jira/browse/FLINK-31344 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API >Reporter: luoyuxia >Assignee: Aitozi >Priority: Major > Labels: pull-request-available > > Currently, it'll throw exception while using update statement to update > nested column; > For the following sql: > > {code:java} > create table (t ROW<`a` INT>) with (xxx); > update t set s.a = 1;{code} > It'll throw the exception: > {code:java} > Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." > at line 1, column 15. > Was expecting: > "=" ... > > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:46382) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:46190) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlUpdate(FlinkSqlParserImpl.java:14389) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:4121) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtList(FlinkSqlParserImpl.java:2998) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtList(FlinkSqlParserImpl.java:306) > at > org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198) > ... 33 more {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (FLINK-31344) Support to update nested columns in update statement
[ https://issues.apache.org/jira/browse/FLINK-31344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17710023#comment-17710023 ] Aitozi commented on FLINK-31344: Thanks for your reply. Totally agree with you. I have basically verified the first work, can you help assign this ticket to me ? > Support to update nested columns in update statement > > > Key: FLINK-31344 > URL: https://issues.apache.org/jira/browse/FLINK-31344 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API >Reporter: luoyuxia >Priority: Major > > Currently, it'll throw exception while using update statement to update > nested column; > For the following sql: > > {code:java} > create table (t ROW<`a` INT>) with (xxx); > update t set s.a = 1;{code} > It'll throw the exception: > {code:java} > Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." > at line 1, column 15. > Was expecting: > "=" ... > > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:46382) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:46190) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlUpdate(FlinkSqlParserImpl.java:14389) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:4121) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtList(FlinkSqlParserImpl.java:2998) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtList(FlinkSqlParserImpl.java:306) > at > org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198) > ... 33 more {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (FLINK-31344) Support to update nested columns in update statement
[ https://issues.apache.org/jira/browse/FLINK-31344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17710011#comment-17710011 ] luoyuxia commented on FLINK-31344: -- [~aitozi] I think it's fine to make SqlParser to accept the compound identifier. But about the modifcation about {{SupportsRowLevelUpdate}} , I perfer to keep for a while to see whether do we really need such modifcation to avoid over design. > Support to update nested columns in update statement > > > Key: FLINK-31344 > URL: https://issues.apache.org/jira/browse/FLINK-31344 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API >Reporter: luoyuxia >Priority: Major > > Currently, it'll throw exception while using update statement to update > nested column; > For the following sql: > > {code:java} > create table (t ROW<`a` INT>) with (xxx); > update t set s.a = 1;{code} > It'll throw the exception: > {code:java} > Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." > at line 1, column 15. > Was expecting: > "=" ... > > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:46382) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:46190) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlUpdate(FlinkSqlParserImpl.java:14389) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:4121) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtList(FlinkSqlParserImpl.java:2998) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtList(FlinkSqlParserImpl.java:306) > at > org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198) > ... 33 more {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (FLINK-31344) Support to update nested columns in update statement
[ https://issues.apache.org/jira/browse/FLINK-31344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17710009#comment-17710009 ] luoyuxia commented on FLINK-31344: -- [~aitozi] Why need to modify the iinterface SupportsRowLevelUpdate? > Support to update nested columns in update statement > > > Key: FLINK-31344 > URL: https://issues.apache.org/jira/browse/FLINK-31344 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API >Reporter: luoyuxia >Priority: Major > > Currently, it'll throw exception while using update statement to update > nested column; > For the following sql: > > {code:java} > create table (t ROW<`a` INT>) with (xxx); > update t set s.a = 1;{code} > It'll throw the exception: > {code:java} > Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." > at line 1, column 15. > Was expecting: > "=" ... > > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:46382) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:46190) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlUpdate(FlinkSqlParserImpl.java:14389) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:4121) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtList(FlinkSqlParserImpl.java:2998) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtList(FlinkSqlParserImpl.java:306) > at > org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198) > ... 33 more {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (FLINK-31344) Support to update nested columns in update statement
[ https://issues.apache.org/jira/browse/FLINK-31344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17709961#comment-17709961 ] Aitozi commented on FLINK-31344: Hi [~luoyuxia], when solving the FLINK-31301 I notice this ticket. After spending some time investigate on this ticket, I think we can support update nested columns in the following step: - Modify the SqlParser to accept the compound identifier for the UPDATE SET clause - Modify the interface SupportsRowLevelUpdate, which will be better to work with {{int[][]}} instead of {{Column}} (It will make the control of required column finer). WDYT ? > Support to update nested columns in update statement > > > Key: FLINK-31344 > URL: https://issues.apache.org/jira/browse/FLINK-31344 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API >Reporter: luoyuxia >Priority: Major > > Currently, it'll throw exception while using update statement to update > nested column; > For the following sql: > > {code:java} > create table (t ROW<`a` INT>) with (xxx); > update t set s.a = 1;{code} > It'll throw the exception: > {code:java} > Caused by: org.apache.flink.sql.parser.impl.ParseException: Encountered "." > at line 1, column 15. > Was expecting: > "=" ... > > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.generateParseException(FlinkSqlParserImpl.java:46382) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.jj_consume_token(FlinkSqlParserImpl.java:46190) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlUpdate(FlinkSqlParserImpl.java:14389) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmt(FlinkSqlParserImpl.java:4121) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.SqlStmtList(FlinkSqlParserImpl.java:2998) > at > org.apache.flink.sql.parser.impl.FlinkSqlParserImpl.parseSqlStmtList(FlinkSqlParserImpl.java:306) > at > org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:198) > ... 33 more {code} > > -- This message was sent by Atlassian Jira (v8.20.10#820010)