Re: Is column aliasing supported?

2022-08-19 Thread Jiajun Xie
Hi, Broeder: There's a tricky situation: alias may be the same as column name. Some users often make mistakes in company that I worked, so I have to point out their problems. If you want to support alias in the WHERE clause, I hope you can consider how to handle this situation. On Sat, 20 Aug

Re: How can I convert a BindableTableScan with projects and Fitlers back to a Rel Tree with a project node, a filter node and a tablescan node?

2022-08-19 Thread Benchao Li
Pranav, This is a good question. To me, I would take this as a bug, and we could improve the RelToSqlConverter to treat BindableTableScan specially. Could you please help log a Jira issue? Contributions are welcome! Pranav Deshpande 于2022年8月20日周六 02:13写道: > Hi Team, > How can I convert a

Re: Is column aliasing supported?

2022-08-19 Thread Sean Broeder
> On Aug 19, 2022, at 3:57 PM, Sean Broeder wrote: > > Thanks for the clarification > >> On Aug 19, 2022, at 3:23 PM, Julian Hyde > > wrote: >> >> Column aliases are only available in the ORDER BY clause. In some >> dialect-compliance settings, they are also

Re: Problem with char type after upgrading from 1.30.0 to 1.31.0

2022-08-19 Thread Julian Hyde
Thanks for the update, Dmitry. Sounds like you were having one of those bad days, as we all do. Good to know that it’s not a problem on the Calcite side. Julian > On Aug 15, 2022, at 3:36 AM, Dmitry Sysolyatin > wrote: > > Sorry guys for wasting your time, it is not regression. I just

Re: Dollar sign in identifiers

2022-08-19 Thread Julian Hyde
Can you please log a jira case to clarify the documentation? (We could consider changing the behavior it is way off the norm.) > On Aug 17, 2022, at 12:39 AM, Itiel Sadeh > wrote: > > Sorry, it was a bad wording. > The question was specifically about identifiers that *starts* with a dollar >

Re: Is column aliasing supported?

2022-08-19 Thread Sean Broeder
Thanks for the clarification > On Aug 19, 2022, at 3:23 PM, Julian Hyde wrote: > > Column aliases are only available in the ORDER BY clause. In some > dialect-compliance settings, they are also available in the GROUP BY and > HAVING clauses. But not in the WHERE clause.

Re: Is there a way to add additional information to type ?

2022-08-19 Thread Julian Hyde
I’ve thought about adding annotations to (the internal representation of) Calcite types. We never got very far with it. It would be tricky because we canonize types, and so if you have two instances that represent, say, DECIMAL(10, 3) with different annotations, are they the same type? One

Re: Is column aliasing supported?

2022-08-19 Thread Julian Hyde
Column aliases are only available in the ORDER BY clause. In some dialect-compliance settings, they are also available in the GROUP BY and HAVING clauses. But not in the WHERE clause. > On Aug 19, 2022, at 2:22 PM, Sean Broeder wrote: > > > Hi, > Calcite is capable of handling a simple

Is column aliasing supported?

2022-08-19 Thread Sean Broeder
Hi, Calcite is capable of handling a simple column alias query such as SELECT city as c FROM (values('PARIS')) as t(city) However, I add a simple predicate SELECT city as c FROM (values('PARIS')) as t(city) WHERE c is not null the query fails in validation indicating "Column 'C' not found in

How can I convert a BindableTableScan with projects and Fitlers back to a Rel Tree with a project node, a filter node and a tablescan node?

2022-08-19 Thread Pranav Deshpande
Hi Team, How can I convert a BindableTableScan with projects and Filters back to a RelTree with a project node, a filter node and a tablescan node? I am doing this because I encountered the following issue (steps detailed below). 1. I have a query:eg. Select colA, colB from myTable where colA >

Is there a way to add additional information to type ?

2022-08-19 Thread Dmitry Sysolyatin
Hello! I am working on emulating a Postgres server and am faced with the following problem: Postgres `pg_catalog` schema has custom types like `name`, those types can be easily mapped to calcite basic types. The problem is that several types in PG can be mapped to one calcite type (for example:

[jira] [Created] (CALCITE-5241) calcite can't support function of char(n) or {fn CHAR(string)}

2022-08-19 Thread pengfei.zhan (Jira)
pengfei.zhan created CALCITE-5241: - Summary: calcite can't support function of char(n) or {fn CHAR(string)} Key: CALCITE-5241 URL: https://issues.apache.org/jira/browse/CALCITE-5241 Project: Calcite