[
https://issues.apache.org/jira/browse/FLINK-28403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17562676#comment-17562676
]
Martijn Visser commented on FLINK-28403:
----------------------------------------
[~suheng.cloud] Please don't start pinging people. As mentioned in the link
I've pasted, if in doubt if this is a bug and therefore needs to end up in
Jira, it's better to first ask on the mailing list. If the conclusion is that
this is indeed a bug, then we can re-open the ticket.
> 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)