You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2022/07/05 12:40:00 UTC
[jira] [Closed] (FLINK-28403) SqlParserPos value for SqlCall is ambiguous
[ https://issues.apache.org/jira/browse/FLINK-28403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martijn Visser closed FLINK-28403.
----------------------------------
Resolution: Invalid
[~suheng.cloud] Please reach out to the Flink User mailing list or Slack channel for help, see https://flink.apache.org/gettinghelp.html. Jira is meant for bugs or new features.
> SqlParserPos value for SqlCall is ambiguous
> -------------------------------------------
>
> Key: FLINK-28403
> URL: https://issues.apache.org/jira/browse/FLINK-28403
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.15.0
> Reporter: suheng.cloud
> Priority: Minor
>
> Dear Community:
> For a long time I was puzzled by how SqlParserPos actually means in SqlCall, because I found the definitions for different statements in parserImpls.ftl are not unified.
> For example, in SqlCreateTable, we use `startPos.plus(getPos())` which means if I want to find out the end position of the last token, calling `SqlCreateTable::getParserPosition::getEndxx` is ok, but in some other statement like SqlRichDescribeTable, we just use the intermediate `pos` as the final position, so I must call `SqlRichDescribeTable.getParserPosition().plusAll(SqlRichDescribeTable::getOperandList())` to merge the result pos. Even worse in SqlStatementSet, which wrapped in SqlExecuate, both above methods not work because no child operand covered `END` syntax.
> My question is
> # Does the SqlParserPosition mean entire span for a sqlCall or not ?
> # What is the easyest and right way to get the "final position" of a SqlCall/SqlNode in fink sql?
> Correct me if I miss some point, thanks for any help.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)