calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jh...@apache.org>
Subject Re: Parser failed for 'select top 10 * from A;'
Date Tue, 18 Apr 2017 00:18:42 GMT
Look through git history for changes related to Parser.jj and SqlParserTest.java.

If you can’t figure out what the parser engine is from that, I don’t think it’s likely
that you will be able to pull off this change.

Julian

> On Apr 17, 2017, at 4:58 PM, Yishu_Coder Lin <yishuthecoder@gmail.com> wrote:
> 
> Hi Julian,
> 
> Thanks for the advise! What is the engine to parse Parser.jj? Where can I
> find the document to learn how to use it?
> 
> Best,
> Yishu
> 
> On Mon, Apr 17, 2017 at 4:55 PM, Julian Hyde <jhyde@apache.org> wrote:
> 
>> Sure, you could change the parser. I suggest you add a few tests to
>> SqlParserTest and then change Parser.jj until the tests pass. You could
>> then translate your query to the same as RelNode tree as “select * from A
>> limit 10”, and Calcite can execute that.
>> 
>> Log a JIRA case describing the syntax you intend to implement.
>> 
>> Julian
>> 
>> 
>>> On Apr 17, 2017, at 4:46 PM, Yishu_Coder Lin <yishuthecoder@gmail.com>
>> wrote:
>>> 
>>> Hi guys,
>>> 
>>> I just started to use Calcite's SQL parser. I am working on a project
>>> related to Teradata and I found calcite doesn't support SQL syntax like
>>> 'select top 10 * from A'.
>>> 
>>> Is there anyway that I can change the parser to support syntax like this?
>>> Please advise. Thanks!
>>> 
>>> Regards,
>>> Yishu
>> 
>> 


Mime
View raw message