It looks like the parser needs to be extended
https://calcite.apache.org/docs/adapter.html#extending-the-parser

On Fri, Dec 17, 2021 at 5:34 PM Arash Bizhan zadeh <[email protected]>
wrote:

> This is my test query
>
> SELECT  IF(CAST(age as numeric) < 0.5, name, last_name) as customer_name
> FROM 307320.test_dataset.customers
>
>
>
> On Fri, Dec 17, 2021 at 5:47 AM Maxim Gramin <[email protected]>
> wrote:
>
> > Can you show the query? I don't see this one.
> >
> > On Thu, Dec 16, 2021 at 10:12 PM Arash Bizhan zadeh <[email protected]>
> > wrote:
> >
> > > Hi,
> > > I am trying to create a parser to parse big query statements like this
> -
> > > this is kotlin btw:
> > >
> > > val sqlParserConfig = BigQuerySqlDialect(
> > >
> > >
> >
> BigQuerySqlDialect.DEFAULT_CONTEXT.withDatabaseProduct(SqlDialect.DatabaseProduct.BIG_QUERY)).configureParser(SqlParser.config()
> > >       .withParserFactory(SqlBabelParserImpl.FACTORY)
> > >
> > >       .withConformance(SqlConformanceEnum.BIG_QUERY))
> > >     val parser = SqlParser.create(str, sqlParserConfig)
> > >
> > > but the resulting parser seems not to understand BQ specific things
> like
> > > the `IF` function.
> > >
> > > How can I properly construct a SqlParser?
> > >
> >
>

Reply via email to