[ 
https://issues.apache.org/jira/browse/FLINK-28403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17562657#comment-17562657
 ] 

suheng.cloud commented on FLINK-28403:
--------------------------------------

[~martijnvisser] thanks, actually I wonder whether it is a bug, so I think 
maybe reported in Jira more suitable :)

cc [~jark]  sorry to ping you in,  can you help to have a look at this issue, 
thanks~

> 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)

Reply via email to