[ https://issues.apache.org/jira/browse/HIVE-3561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472956#comment-13472956 ]
Zhenxiao Luo commented on HIVE-3561: ------------------------------------ +1 for the first approach. HiveQL is very similar to Standard SQL, yet not exactly the same. The current Hive Parser is doing good for HiveQL. There are something missing from standardSQL, I think we could add them one by one, extending the existing parser, and maybe also add some UDFs for any missing functionality. > Build a full SQL-compliant parser for Hive > ------------------------------------------ > > Key: HIVE-3561 > URL: https://issues.apache.org/jira/browse/HIVE-3561 > Project: Hive > Issue Type: Sub-task > Components: Query Processor > Affects Versions: 0.10.0 > Reporter: Shengsheng Huang > > To build a full SQL compliant engine on Hive, we'll need a full SQL complant > parser. The current Hive parser missed a lot of grammar units from standard > SQL. To support full SQL there're possibly four approaches: > 1.Extend the existing Hive parser to support full SQL constructs. We need to > modify the current Hive.g and add any missing grammar units and resolve > conflicts. > 2.Reuse an existing open source SQL compliant parser and extend it to support > Hive extensions. We may need to adapt Semantic Analyzers to the new AST > structure. > 3.Reuse an existing SQL compliant parser and make it co-exist with the > existing Hive parser. Both parsers share the same CliDriver interface. Use a > query mode configuration to switch the query mode between SQL and HQL (this > is the approach we're now using in the 0.9.0 demo project) > 4.Reuse an existing SQL compliant parser and make it co-exist with the > existing Hive parser. Use a separate xxxCliDriver interface for standard SQL. > > Let's discuss which is the best approach. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira