Re: SQL column names - double quoted

2022-05-26 Thread Sandeep N
Thank you Yanjing, that fix addressed it.

--Sandeep

On Thu, May 26, 2022 at 5:33 PM Yanjing Wang 
wrote:

> Hi Sandeep,
>
> try select.toSqlString(new
>
> AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString(""))).getSql().
>
> Sandeep N  于2022年5月27日周五 06:03写道:
>
> > Hi Stamatis,
> >
> > Thanks for the quick response, I tried your suggestion as follows
> >
> > RelToSqlConverter converter = new RelToSqlConverter(new
> >
> >
> AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString("")));
> > SqlSelect select = converter.visitRoot(relNode).asSelect();
> > SqlWriterConfig config = SqlPrettyWriter.config().
> > withCaseClausesOnNewLines(false).
> > withQuoteAllIdentifiers(false);
> > System.out.println(new SqlPrettyWriter(config).format(select));
> >
> > and I still get this
> > SELECT "a"
> > FROM test_table
> > WHERE "b" = 'value';
> >
> > It is not obvious to me as to what I am doing wrong. Is the above block
> of
> > code the only pieces that I need to put in play to get that sql
> generated?
> >
> > --Sandeep
> >
> > On Thu, May 26, 2022 at 2:22 PM Stamatis Zampetakis 
> > wrote:
> >
> > > Hi Sandeep,
> > >
> > > If you want to turn off quoting (which I am not sure if it is a good
> > idea)
> > > when you go from relational algebra to SQL you have to customize the
> > > SqlDialect that you are using via Context#withIdentifierQuoteString
> [1].
> > > You can find a small example as part of RelToSqlConverterTest here [2].
> > >
> > > Best,
> > > Stamatis
> > >
> > > [1]
> > >
> > >
> >
> https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L1408
> > > [2]
> > >
> > >
> >
> https://github.com/zabetak/calcite/commit/ea18d28f4fb44113c414c393fe28fc94b3eecc29
> > >
> > > On Thu, May 26, 2022 at 9:18 PM Sandeep N 
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am pretty aware that this question may have been asked before as I
> > have
> > > > found references on stackoverflow but have yet to stumble on a
> response
> > > > which lays out the path on solving this.
> > > >
> > > > Here is the problem I am facing -
> > > > I am using relational algebra to generate SQL on a table test_table
> > with
> > > > two columns a and b fed into the calcite Framework (see below) via a
> > > custom
> > > > catalog. Both a and b are varchar columns.
> > > >
> > > > FrameworkConfig config = Frameworks.newConfigBuilder().
> > > > parserConfig(SqlParser.Config.DEFAULT).
> > > > defaultSchema(addSchemas(rootSchema, schemaName,
> > > schema)).
> > > > <--- this is where I plug my custom table.
> > > > traitDefs((List) null).
> > > > operatorTable(sqlOperatorTable).
> > > >
>  programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
> > > > true, 2)).build()
> > > >
> > > > The relational algebra is then used to generate SQL to the
> > AnsiSqlDialect
> > > > and the resultant output SQL is
> > > >
> > > > SELECT "a"
> > > > FROM test_table
> > > > WHERE "b" = 'value';
> > > >
> > > > I have the SqlWriterConfig setup as such
> > > >
> > > > SqlWriterConfig config = SqlPrettyWriter.config().
> > > > withCaseClausesOnNewLines(false).
> > > > withQuoteAllIdentifiers(false);
> > > >
> > > > I have been trying to figure what needs to change in the sql writer
> but
> > > > after scanning stackoverflow it appears this is controlled by
> > > > CalciteConnectionConfig and potentially not the SqlWriter. Is this
> > > > accurate? and if so how do I assemble the right connection config
> when
> > I
> > > am
> > > > building the custom catalog?
> > > >
> > > > P.s: I am not parsing SQL but writing directly to the relational
> > algebra
> > > > nodes so SqlParser does not come into play here.
> > > >
> > > > Any pointers on how I can go about this is appreciated, say existing
> > > tests
> > > > or code which will help me put together a configuration which gets me
> > to
> > > > this sql
> > > >
> > > > SELECT a
> > > > FROM test_table
> > > > WHERE b = 'value';
> > > >
> > > > Thanks in advance.
> > > >
> > > > --Sandeep
> > > >
> > >
> >
>


Re: [ANNOUNCE] Vladimir Ozerov joins Calcite PMC

2022-05-26 Thread Yanjing Wang
Congrats Vladimir!

Forward Xu  于2022年5月25日周三 15:18写道:

> Congratulations Vladimir!
>
>
> Best,
>
> ForwardXu
>
> Stamatis Zampetakis  于2022年5月25日周三 15:05写道:
>
> > Congratulations Vladimir. You have shown that you care for the project in
> > many different ways and it's only natural to see you in the PMC.
> >
> > Best,
> > Stamatis
> >
> > On Wed, May 25, 2022 at 8:33 AM Haisheng Yuan  wrote:
> >
> > > Congratulations Vladimir!
> > >
> > > On 2022/05/25 06:27:16 Michael Mior wrote:
> > > > Congratulations Vladimir!
> > > >
> > > > --
> > > > Michael Mior
> > > > mm...@apache.org
> > > >
> > > >
> > > > Le mar. 24 mai 2022 à 16:47, Ruben Q L  a écrit :
> > > >
> > > > > I am pleased to announce that Vladimir has accepted an invitation
> to
> > > join
> > > > > the Calcite PMC. Vladimir has been a consistent and helpful figure
> in
> > > the
> > > > > Calcite community for which we are very grateful. We look forward
> to
> > > the
> > > > > continued contributions and support.
> > > > >
> > > > > Please join me in congratulating Vladimir!
> > > > >
> > > > > - Ruben (on behalf of the Calcite PMC)
> > > > >
> > > >
> > >
> >
>


Re: [ANNOUNCE] Chunwei Lei joins Calcite PMC

2022-05-26 Thread Yanjing Wang
Congrats, Chunwei!

Forward Xu  于2022年5月25日周三 15:17写道:

> Congratulations, Chunwei!
>
>
> Best,
>
> Forwardxu
>
> Stamatis Zampetakis  于2022年5月25日周三 14:46写道:
>
> > Congratulations Chunwei. You have been doing a lot of work for the
> project
> > and this is very much appreciated!
> > Thanks for all your efforts.
> >
> > Best,
> > Stamatis
> >
> > On Wed, May 25, 2022 at 8:32 AM Haisheng Yuan  wrote:
> >
> > > Congratulations, Chunwei!
> > >
> > > On 2022/05/25 06:26:35 Michael Mior wrote:
> > > > Congratulations and thank you Chunwei!
> > > >
> > > > --
> > > > Michael Mior
> > > > mm...@apache.org
> > > >
> > > >
> > > > Le mar. 24 mai 2022 à 16:47, Ruben Q L  a écrit :
> > > >
> > > > > I am pleased to announce that Chunwei has accepted an invitation to
> > > join
> > > > > the
> > > > >  Calcite PMC. Chunwei has been a consistent and helpful figure in
> the
> > > > > Calcite community for which we are very grateful. We look forward
> to
> > > the
> > > > > continued contributions and support.
> > > > >
> > > > > Please join me in congratulating Chunwei!
> > > > >
> > > > > - Ruben (on behalf of the Calcite PMC)
> > > > >
> > > >
> > >
> >
>


Re: SQL column names - double quoted

2022-05-26 Thread Chunwei Lei
Hi Sandeep,

In my project, I used the same way as what Yanjing proposed and it works
well.


Best,
Chunwei


On Fri, May 27, 2022 at 8:34 AM Yanjing Wang 
wrote:

> Hi Sandeep,
>
> try select.toSqlString(new
>
> AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString(""))).getSql().
>
> Sandeep N  于2022年5月27日周五 06:03写道:
>
> > Hi Stamatis,
> >
> > Thanks for the quick response, I tried your suggestion as follows
> >
> > RelToSqlConverter converter = new RelToSqlConverter(new
> >
> >
> AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString("")));
> > SqlSelect select = converter.visitRoot(relNode).asSelect();
> > SqlWriterConfig config = SqlPrettyWriter.config().
> > withCaseClausesOnNewLines(false).
> > withQuoteAllIdentifiers(false);
> > System.out.println(new SqlPrettyWriter(config).format(select));
> >
> > and I still get this
> > SELECT "a"
> > FROM test_table
> > WHERE "b" = 'value';
> >
> > It is not obvious to me as to what I am doing wrong. Is the above block
> of
> > code the only pieces that I need to put in play to get that sql
> generated?
> >
> > --Sandeep
> >
> > On Thu, May 26, 2022 at 2:22 PM Stamatis Zampetakis 
> > wrote:
> >
> > > Hi Sandeep,
> > >
> > > If you want to turn off quoting (which I am not sure if it is a good
> > idea)
> > > when you go from relational algebra to SQL you have to customize the
> > > SqlDialect that you are using via Context#withIdentifierQuoteString
> [1].
> > > You can find a small example as part of RelToSqlConverterTest here [2].
> > >
> > > Best,
> > > Stamatis
> > >
> > > [1]
> > >
> > >
> >
> https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L1408
> > > [2]
> > >
> > >
> >
> https://github.com/zabetak/calcite/commit/ea18d28f4fb44113c414c393fe28fc94b3eecc29
> > >
> > > On Thu, May 26, 2022 at 9:18 PM Sandeep N 
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am pretty aware that this question may have been asked before as I
> > have
> > > > found references on stackoverflow but have yet to stumble on a
> response
> > > > which lays out the path on solving this.
> > > >
> > > > Here is the problem I am facing -
> > > > I am using relational algebra to generate SQL on a table test_table
> > with
> > > > two columns a and b fed into the calcite Framework (see below) via a
> > > custom
> > > > catalog. Both a and b are varchar columns.
> > > >
> > > > FrameworkConfig config = Frameworks.newConfigBuilder().
> > > > parserConfig(SqlParser.Config.DEFAULT).
> > > > defaultSchema(addSchemas(rootSchema, schemaName,
> > > schema)).
> > > > <--- this is where I plug my custom table.
> > > > traitDefs((List) null).
> > > > operatorTable(sqlOperatorTable).
> > > >
>  programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
> > > > true, 2)).build()
> > > >
> > > > The relational algebra is then used to generate SQL to the
> > AnsiSqlDialect
> > > > and the resultant output SQL is
> > > >
> > > > SELECT "a"
> > > > FROM test_table
> > > > WHERE "b" = 'value';
> > > >
> > > > I have the SqlWriterConfig setup as such
> > > >
> > > > SqlWriterConfig config = SqlPrettyWriter.config().
> > > > withCaseClausesOnNewLines(false).
> > > > withQuoteAllIdentifiers(false);
> > > >
> > > > I have been trying to figure what needs to change in the sql writer
> but
> > > > after scanning stackoverflow it appears this is controlled by
> > > > CalciteConnectionConfig and potentially not the SqlWriter. Is this
> > > > accurate? and if so how do I assemble the right connection config
> when
> > I
> > > am
> > > > building the custom catalog?
> > > >
> > > > P.s: I am not parsing SQL but writing directly to the relational
> > algebra
> > > > nodes so SqlParser does not come into play here.
> > > >
> > > > Any pointers on how I can go about this is appreciated, say existing
> > > tests
> > > > or code which will help me put together a configuration which gets me
> > to
> > > > this sql
> > > >
> > > > SELECT a
> > > > FROM test_table
> > > > WHERE b = 'value';
> > > >
> > > > Thanks in advance.
> > > >
> > > > --Sandeep
> > > >
> > >
> >
>


[DISCUSS] not equal operator vs less than combining greater than

2022-05-26 Thread Yanjing Wang
Hi community,

I have this sql: select * from "emps" where "name" <> '' and "name" <> '3'

I thought it would generate the same plan with
select * from "emps" where ("name" > '' or "name" < '') and ("name" > '3'
or "name" < '3')

but not, the not equal operator consistency is different with less than and
greater than operator,

which will cause the literal '' and '3' have different data type in plans
of the above sqls.

That behavior maybe cause some queries will not hit the materialization.

should we canonize  ("name" > '' or "name" < '') and ("name" > '3' or
"name" < '3') to not equal or vice versa as RelToSql

 behaves?


Re: SQL column names - double quoted

2022-05-26 Thread Yanjing Wang
Hi Sandeep,

try select.toSqlString(new
AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString(""))).getSql().

Sandeep N  于2022年5月27日周五 06:03写道:

> Hi Stamatis,
>
> Thanks for the quick response, I tried your suggestion as follows
>
> RelToSqlConverter converter = new RelToSqlConverter(new
>
> AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString("")));
> SqlSelect select = converter.visitRoot(relNode).asSelect();
> SqlWriterConfig config = SqlPrettyWriter.config().
> withCaseClausesOnNewLines(false).
> withQuoteAllIdentifiers(false);
> System.out.println(new SqlPrettyWriter(config).format(select));
>
> and I still get this
> SELECT "a"
> FROM test_table
> WHERE "b" = 'value';
>
> It is not obvious to me as to what I am doing wrong. Is the above block of
> code the only pieces that I need to put in play to get that sql generated?
>
> --Sandeep
>
> On Thu, May 26, 2022 at 2:22 PM Stamatis Zampetakis 
> wrote:
>
> > Hi Sandeep,
> >
> > If you want to turn off quoting (which I am not sure if it is a good
> idea)
> > when you go from relational algebra to SQL you have to customize the
> > SqlDialect that you are using via Context#withIdentifierQuoteString [1].
> > You can find a small example as part of RelToSqlConverterTest here [2].
> >
> > Best,
> > Stamatis
> >
> > [1]
> >
> >
> https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L1408
> > [2]
> >
> >
> https://github.com/zabetak/calcite/commit/ea18d28f4fb44113c414c393fe28fc94b3eecc29
> >
> > On Thu, May 26, 2022 at 9:18 PM Sandeep N 
> > wrote:
> >
> > > Hi all,
> > >
> > > I am pretty aware that this question may have been asked before as I
> have
> > > found references on stackoverflow but have yet to stumble on a response
> > > which lays out the path on solving this.
> > >
> > > Here is the problem I am facing -
> > > I am using relational algebra to generate SQL on a table test_table
> with
> > > two columns a and b fed into the calcite Framework (see below) via a
> > custom
> > > catalog. Both a and b are varchar columns.
> > >
> > > FrameworkConfig config = Frameworks.newConfigBuilder().
> > > parserConfig(SqlParser.Config.DEFAULT).
> > > defaultSchema(addSchemas(rootSchema, schemaName,
> > schema)).
> > > <--- this is where I plug my custom table.
> > > traitDefs((List) null).
> > > operatorTable(sqlOperatorTable).
> > > programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
> > > true, 2)).build()
> > >
> > > The relational algebra is then used to generate SQL to the
> AnsiSqlDialect
> > > and the resultant output SQL is
> > >
> > > SELECT "a"
> > > FROM test_table
> > > WHERE "b" = 'value';
> > >
> > > I have the SqlWriterConfig setup as such
> > >
> > > SqlWriterConfig config = SqlPrettyWriter.config().
> > > withCaseClausesOnNewLines(false).
> > > withQuoteAllIdentifiers(false);
> > >
> > > I have been trying to figure what needs to change in the sql writer but
> > > after scanning stackoverflow it appears this is controlled by
> > > CalciteConnectionConfig and potentially not the SqlWriter. Is this
> > > accurate? and if so how do I assemble the right connection config when
> I
> > am
> > > building the custom catalog?
> > >
> > > P.s: I am not parsing SQL but writing directly to the relational
> algebra
> > > nodes so SqlParser does not come into play here.
> > >
> > > Any pointers on how I can go about this is appreciated, say existing
> > tests
> > > or code which will help me put together a configuration which gets me
> to
> > > this sql
> > >
> > > SELECT a
> > > FROM test_table
> > > WHERE b = 'value';
> > >
> > > Thanks in advance.
> > >
> > > --Sandeep
> > >
> >
>


Re: SQL column names - double quoted

2022-05-26 Thread Sandeep N
Hi Stamatis,

Thanks for the quick response, I tried your suggestion as follows

RelToSqlConverter converter = new RelToSqlConverter(new
AnsiSqlDialect(AnsiSqlDialect.DEFAULT_CONTEXT.withIdentifierQuoteString("")));
SqlSelect select = converter.visitRoot(relNode).asSelect();
SqlWriterConfig config = SqlPrettyWriter.config().
withCaseClausesOnNewLines(false).
withQuoteAllIdentifiers(false);
System.out.println(new SqlPrettyWriter(config).format(select));

and I still get this
SELECT "a"
FROM test_table
WHERE "b" = 'value';

It is not obvious to me as to what I am doing wrong. Is the above block of
code the only pieces that I need to put in play to get that sql generated?

--Sandeep

On Thu, May 26, 2022 at 2:22 PM Stamatis Zampetakis 
wrote:

> Hi Sandeep,
>
> If you want to turn off quoting (which I am not sure if it is a good idea)
> when you go from relational algebra to SQL you have to customize the
> SqlDialect that you are using via Context#withIdentifierQuoteString [1].
> You can find a small example as part of RelToSqlConverterTest here [2].
>
> Best,
> Stamatis
>
> [1]
>
> https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L1408
> [2]
>
> https://github.com/zabetak/calcite/commit/ea18d28f4fb44113c414c393fe28fc94b3eecc29
>
> On Thu, May 26, 2022 at 9:18 PM Sandeep N 
> wrote:
>
> > Hi all,
> >
> > I am pretty aware that this question may have been asked before as I have
> > found references on stackoverflow but have yet to stumble on a response
> > which lays out the path on solving this.
> >
> > Here is the problem I am facing -
> > I am using relational algebra to generate SQL on a table test_table with
> > two columns a and b fed into the calcite Framework (see below) via a
> custom
> > catalog. Both a and b are varchar columns.
> >
> > FrameworkConfig config = Frameworks.newConfigBuilder().
> > parserConfig(SqlParser.Config.DEFAULT).
> > defaultSchema(addSchemas(rootSchema, schemaName,
> schema)).
> > <--- this is where I plug my custom table.
> > traitDefs((List) null).
> > operatorTable(sqlOperatorTable).
> > programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
> > true, 2)).build()
> >
> > The relational algebra is then used to generate SQL to the AnsiSqlDialect
> > and the resultant output SQL is
> >
> > SELECT "a"
> > FROM test_table
> > WHERE "b" = 'value';
> >
> > I have the SqlWriterConfig setup as such
> >
> > SqlWriterConfig config = SqlPrettyWriter.config().
> > withCaseClausesOnNewLines(false).
> > withQuoteAllIdentifiers(false);
> >
> > I have been trying to figure what needs to change in the sql writer but
> > after scanning stackoverflow it appears this is controlled by
> > CalciteConnectionConfig and potentially not the SqlWriter. Is this
> > accurate? and if so how do I assemble the right connection config when I
> am
> > building the custom catalog?
> >
> > P.s: I am not parsing SQL but writing directly to the relational algebra
> > nodes so SqlParser does not come into play here.
> >
> > Any pointers on how I can go about this is appreciated, say existing
> tests
> > or code which will help me put together a configuration which gets me to
> > this sql
> >
> > SELECT a
> > FROM test_table
> > WHERE b = 'value';
> >
> > Thanks in advance.
> >
> > --Sandeep
> >
>


Re: SQL column names - double quoted

2022-05-26 Thread Stamatis Zampetakis
Hi Sandeep,

If you want to turn off quoting (which I am not sure if it is a good idea)
when you go from relational algebra to SQL you have to customize the
SqlDialect that you are using via Context#withIdentifierQuoteString [1].
You can find a small example as part of RelToSqlConverterTest here [2].

Best,
Stamatis

[1]
https://github.com/apache/calcite/blob/9bdfd9a178f493b235d8785afd94fd0c998e8cce/core/src/main/java/org/apache/calcite/sql/SqlDialect.java#L1408
[2]
https://github.com/zabetak/calcite/commit/ea18d28f4fb44113c414c393fe28fc94b3eecc29

On Thu, May 26, 2022 at 9:18 PM Sandeep N  wrote:

> Hi all,
>
> I am pretty aware that this question may have been asked before as I have
> found references on stackoverflow but have yet to stumble on a response
> which lays out the path on solving this.
>
> Here is the problem I am facing -
> I am using relational algebra to generate SQL on a table test_table with
> two columns a and b fed into the calcite Framework (see below) via a custom
> catalog. Both a and b are varchar columns.
>
> FrameworkConfig config = Frameworks.newConfigBuilder().
> parserConfig(SqlParser.Config.DEFAULT).
> defaultSchema(addSchemas(rootSchema, schemaName, schema)).
> <--- this is where I plug my custom table.
> traitDefs((List) null).
> operatorTable(sqlOperatorTable).
> programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
> true, 2)).build()
>
> The relational algebra is then used to generate SQL to the AnsiSqlDialect
> and the resultant output SQL is
>
> SELECT "a"
> FROM test_table
> WHERE "b" = 'value';
>
> I have the SqlWriterConfig setup as such
>
> SqlWriterConfig config = SqlPrettyWriter.config().
> withCaseClausesOnNewLines(false).
> withQuoteAllIdentifiers(false);
>
> I have been trying to figure what needs to change in the sql writer but
> after scanning stackoverflow it appears this is controlled by
> CalciteConnectionConfig and potentially not the SqlWriter. Is this
> accurate? and if so how do I assemble the right connection config when I am
> building the custom catalog?
>
> P.s: I am not parsing SQL but writing directly to the relational algebra
> nodes so SqlParser does not come into play here.
>
> Any pointers on how I can go about this is appreciated, say existing tests
> or code which will help me put together a configuration which gets me to
> this sql
>
> SELECT a
> FROM test_table
> WHERE b = 'value';
>
> Thanks in advance.
>
> --Sandeep
>


SQL column names - double quoted

2022-05-26 Thread Sandeep N
Hi all,

I am pretty aware that this question may have been asked before as I have
found references on stackoverflow but have yet to stumble on a response
which lays out the path on solving this.

Here is the problem I am facing -
I am using relational algebra to generate SQL on a table test_table with
two columns a and b fed into the calcite Framework (see below) via a custom
catalog. Both a and b are varchar columns.

FrameworkConfig config = Frameworks.newConfigBuilder().
parserConfig(SqlParser.Config.DEFAULT).
defaultSchema(addSchemas(rootSchema, schemaName, schema)).
<--- this is where I plug my custom table.
traitDefs((List) null).
operatorTable(sqlOperatorTable).
programs(Programs.heuristicJoinOrder(Programs.RULE_SET,
true, 2)).build()

The relational algebra is then used to generate SQL to the AnsiSqlDialect
and the resultant output SQL is

SELECT "a"
FROM test_table
WHERE "b" = 'value';

I have the SqlWriterConfig setup as such

SqlWriterConfig config = SqlPrettyWriter.config().
withCaseClausesOnNewLines(false).
withQuoteAllIdentifiers(false);

I have been trying to figure what needs to change in the sql writer but
after scanning stackoverflow it appears this is controlled by
CalciteConnectionConfig and potentially not the SqlWriter. Is this
accurate? and if so how do I assemble the right connection config when I am
building the custom catalog?

P.s: I am not parsing SQL but writing directly to the relational algebra
nodes so SqlParser does not come into play here.

Any pointers on how I can go about this is appreciated, say existing tests
or code which will help me put together a configuration which gets me to
this sql

SELECT a
FROM test_table
WHERE b = 'value';

Thanks in advance.

--Sandeep


Re: [DISCUSS] Towards Calcite 1.31.0

2022-05-26 Thread xiong duan
+1 for mid-June for the first RC.

Benchao Li  于2022年5月26日周四 10:31写道:

> +1 for mid-June for the first RC.
> Thanks Ruben for driving this, and Andrei for being the RM.
>
> For me, I have two PRs[1][2] which I think it's good to have them in 1.31.0
> And for other issues which I've not opened pr yet, I think it's reasonable
> to postpone them to next version.
>
> [1] https://github.com/apache/calcite/pull/2791
> [2] https://github.com/apache/calcite/pull/2813
>
> Andrei Sereda  于2022年5月26日周四 09:16写道:
>
> > > Andrei, are you still available for the task?
> >
> > Yes. I'm happy to be the Release Manager for 1.31
> >
> > On Wed, May 25, 2022 at 9:15 PM Chunwei Lei 
> > wrote:
> >
> > > Thank you for taking care of this, Ruben.
> > >
> > > +1 for mid-June for the first RC.
> > >
> > >
> > > Best,
> > > Chunwei
> > >
> > >
> > > On Wed, May 25, 2022 at 4:26 PM Ruben Q L  wrote:
> > >
> > > > Hello,
> > > >
> > > > It has been more than two months since our last release [1], and I
> > think
> > > we
> > > > should make an effort to continue keeping the rhythm of one release
> > every
> > > > two months approximately.
> > > >
> > > > If I am not mistaken, the next release manager would be Andrei Sereda
> > > [2].
> > > > Andrei, are you still available for the task?
> > > >
> > > > As usual, according to our Jira dashboard [3] and Github [4], there
> are
> > > > many pending issues that could / should be part of the release. I'd
> > > propose
> > > > to make a collective effort to try to clean up our 1.31 backlog:
> > complete
> > > > and merge the PRs which are in a reasonably good state, and push back
> > to
> > > > 1.32 (or unassigned version) the Jira tickets that are not advanced
> > > enough
> > > > to be part of this release. Shall we give ourselves around two weeks
> > for
> > > > this and aim at mid-June for the first RC? WDYT?
> > > >
> > > > Best regards,
> > > > Ruben
> > > >
> > > > [1] https://calcite.apache.org/news/2022/03/19/release-1.30.0/
> > > > [2] https://lists.apache.org/thread/ykbhhxmljw6wg50rxs6ypp35173hlkdv
> > > > [3]
> > > >
> > >
> >
> https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12333950
> > > > [4] https://github.com/apache/calcite/pulls
> > > >
> > >
> >
>
>
> --
>
> Best,
> Benchao Li
>