Calcite is open source, so you can certainly modify the parser. The 
architecture of the parser had been designed to be flexible and even calcite 
has several parsers, the strandard one, server, and Babel. Let me know if you 
need help figuring out how to roll your own.

Mihai
________________________________
From: Thomas Wang <w...@datability.io>
Sent: Saturday, September 30, 2023 7:42:19 PM
To: dev@calcite.apache.org <dev@calcite.apache.org>
Subject: Re: SQL Parsing

Thanks Mihai, "BIGINT ARRAY" seems to work! Just curious if I can have
flexibility to change the behavior of the parse to parse "ARRAY<BIGINT>"
instead?

Thomas

On Sat, Sep 30, 2023 at 6:32 PM Mihai Budiu <mbu...@gmail.com> wrote:

> The syntax is "bigint array"
> https://calcite.apache.org/docs/reference.html
> ________________________________
> From: Thomas Wang <w...@datability.io>
> Sent: Saturday, September 30, 2023 6:27:46 PM
> To: dev@calcite.apache.org <dev@calcite.apache.org>
> Subject: SQL Parsing
>
> Hi Apache Calcite Community,
>
> I'm new to Apache Calcite and trying to use it for SQL parsing and SQL
> rewriting.
>
> I tried to parse a couple of SELECT statements and it works pretty well.
> However, when I tried to parse a SELECT statement that contains a cast to
> array like below, it complains it cannot recognize ARRAY.
>
> SELECT CAST(NULL AS ARRAY<BIGINT>) FROM schema.t1
>
> However, casting to BIGINT seems ok. The following SELECT is ok.
>
> SELECT CAST(NULL AS BIGINT) FROM schema.t1
>
> Is there any configuration I need to enable to enable/support parsing
> ARRAY? Thanks.
>
> Thomas
>

Reply via email to