flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhanghang-dev (Jira)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-17409) SqlCreateView's SqlParserPos return wrong value
Date Mon, 01 Jun 2020 02:15:00 GMT

     [ https://issues.apache.org/jira/browse/FLINK-17409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

zhanghang-dev updated FLINK-17409:
----------------------------------
    Component/s:     (was: Table SQL / Runtime)
                 Table SQL / Planner

> SqlCreateView's SqlParserPos return wrong value
> -----------------------------------------------
>
>                 Key: FLINK-17409
>                 URL: https://issues.apache.org/jira/browse/FLINK-17409
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: zhanghang-dev
>            Priority: Minor
>
> i add a test method in FlinkSqlParserImplTest,sqlNode.getParserPosition().getEndColumnNum()
should return length of sql.
> {code:java}
> @Test
> public void testCreateViewSqlNodePosition() throws SqlParseException{
>  String sql = "CREATE VIEW v1 AS SELECT 1";
>  SqlNode sqlNode = getSqlParser(sql).parseQuery();
>  System.out.println(sqlNode.getParserPosition().getLineNum());      // 1
>  System.out.println(sqlNode.getParserPosition().getEndLineNum());   // 1
>  System.out.println(sqlNode.getParserPosition().getColumnNum());    // 1
>  System.out.println(sqlNode.getParserPosition().getEndColumnNum()); // 6 wrong
> }
> {code}
>  



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

Mime
View raw message