Re: Numeric literals

2024-02-15 Thread Sean Broeder
gt; > By the way, Postgres seems to do the same as Calcite. > > On Wed, Feb 14, 2024 at 6:13 PM Sean Broeder <mailto:sbroe...@apache.org>> wrote: >> >> It looks like Calcite converts "SELECT 1000L" into "SELECT 1000 AS 'L' " in >>

Numeric literals

2024-02-14 Thread Sean Broeder
It looks like Calcite converts "SELECT 1000L" into "SELECT 1000 AS 'L' " in SqlParserImpl.UnsignedNumericLiteral. Is this expected? Note, there is no space between 1000 and L in the original statement. Thanks, Sean

Re: Nested join support

2024-01-02 Thread Sean Broeder
y formatted, so I can't see what pattern in it is confusing the > parser.) > > On Tue, Jan 2, 2024 at 11:46 AM Sean Broeder wrote: >> >> It looks like Calcite doesn't support the query >> >> select * from (values (1, 'John')) as >> >>

Nested join support

2024-01-02 Thread Sean Broeder
It looks like Calcite doesn't support the query select * from (values (1, 'John')) as "customer"(c_custkey, c_name) left outer join (values(100, 1)) as "orders"(o_orderkey, o_custkey) inner join (values (100, 'Random item')) as "lineitem"(l_orderkey, l_itemname) on o_orderkey = l_orderkey on c

Re: Join using

2023-02-27 Thread Sean Broeder
Thank you for confirming Julian. I have logged CALCITE-5547 for this. > On Feb 27, 2023, at 12:23 PM, Julian Hyde wrote: > > I agree. Your query should return (xxx, i, j, t, k). Please log a bug. > >> On Feb 27, 2023, at 11:54 AM, Sean Broeder wrote: >> >> Hi,

[jira] [Created] (CALCITE-5547) Join using returns incorrect column names

2023-02-27 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-5547: - Summary: Join using returns incorrect column names Key: CALCITE-5547 URL: https://issues.apache.org/jira/browse/CALCITE-5547 Project: Calcite Issue Type

Join using

2023-02-27 Thread Sean Broeder
Hi, I am investigating a query where a column is selected as well as a join of two tables with ‘using’ syntax. I believe calcite is not returning the correct columns. I am hoping someone can confirm my finding or correct my misunderstanding. For example, given the query: “SELECT '' as \"xxx\"

Re: [DISCUSS] Towards Calcite 1.33.0

2022-12-14 Thread Sean Broeder
Are there plans to release a new version of Avatica(1.23) to be included in Calcite 1.33.0? Thanks, Sean > On Dec 14, 2022, at 3:47 PM, Jess Balint wrote: > > I have reviewed a few PRs. The Proj4j fix has been merged. Do we have any > more bandwidth for reviews or anybody asking for reviews?

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 > <mailto:jhyde.apa...@gmail.com>> wrote: >> >> Column aliases are only available in the ORDER BY clause. In some >

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.

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 an

[jira] [Created] (CALCITE-4648) Except returns wrong results

2021-06-10 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-4648: - Summary: Except returns wrong results Key: CALCITE-4648 URL: https://issues.apache.org/jira/browse/CALCITE-4648 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-4647) intersect returns wrong results

2021-06-10 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-4647: - Summary: intersect returns wrong results Key: CALCITE-4647 URL: https://issues.apache.org/jira/browse/CALCITE-4647 Project: Calcite Issue Type: Bug

[jira] [Created] (CALCITE-4633) Enable RelFieldTrimmer to trim fields on a distinct UNION

2021-06-02 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-4633: - Summary: Enable RelFieldTrimmer to trim fields on a distinct UNION Key: CALCITE-4633 URL: https://issues.apache.org/jira/browse/CALCITE-4633 Project: Calcite

Re: RelFieldTrimmer on union distinct

2021-06-02 Thread Sean Broeder
select 'a' from scott.emp >union >select 'a' from scott.dept); > > returns 1. (I included ‘a’ because SQL doesn’t allow an empty SELECT clause. > It doesn’t affect the reasoning.) > > Julian > > > >> On Jun 2, 2021, at 6:03 AM, Sean

RelFieldTrimmer on union distinct

2021-06-02 Thread Sean Broeder
Currently the RefFieldTrimmer only trims on a UNION ALL operation. I've been experimenting to see if it is also possible to trim on UNION DISTINCT. Is there a simple query that demonstrates why this is not possible? Thanks, Sean

Contributor access

2021-01-26 Thread Sean Broeder
Hello, I would like contributor access, please. My Mira account is sbroeder. Regards, Sean

[jira] [Created] (CALCITE-4183) FilterSetOpTransposeRule constructor should allow for user defined Filter and SetOp classes

2020-08-20 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-4183: - Summary: FilterSetOpTransposeRule constructor should allow for user defined Filter and SetOp classes Key: CALCITE-4183 URL: https://issues.apache.org/jira/browse/CALCITE-4183

Correlated subquery losing aggregator operator in inner join?

2020-07-07 Thread Sean Broeder
Hi, I am following up on JIRA-4100. I am trying to understand the plan generated by the SQL query select e.empno, e.sal, e.deptno emp_dept, d.deptno dep_dept from emp e left join dept d on e.deptno = ( select max(sal) from emp where deptno = e.deptno) The plan

[jira] [Created] (CALCITE-4100) Join plan with select MAX subquery drops MAX operator

2020-07-01 Thread Sean Broeder (Jira)
Sean Broeder created CALCITE-4100: - Summary: Join plan with select MAX subquery drops MAX operator Key: CALCITE-4100 URL: https://issues.apache.org/jira/browse/CALCITE-4100 Project: Calcite