[jira] [Created] (FLINK-17409) SqlCreateView's SqlParserPos return wrong value

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-17409) SqlCreateView's SqlParserPos return wrong value

Shang Yuanchun (Jira)
zhanghang-dev created FLINK-17409:
-------------------------------------

             Summary: 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 / Runtime
    Affects Versions: 1.10.0
            Reporter: zhanghang-dev


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)