Re: Incorrect Sql2Rel conversion for SELECT DISTINCT .. ORDER BY

2022-05-03 Thread Julian Hyde
I think that Postgres is a little stricter than necessary. As long as the operations are pure, the ORDER BY clause of a SELECT DISTINCT query should allow any expression that is functionally dependent on the expressions in the SELECT clause. In particular, SELECT DISTINCT x, y FROM t ORDER

[jira] [Created] (CALCITE-5129) Exception thrown writing to a closed stream with SPNEGO authentication at DEBUG

2022-05-03 Thread Josh Elser (Jira)
Josh Elser created CALCITE-5129: --- Summary: Exception thrown writing to a closed stream with SPNEGO authentication at DEBUG Key: CALCITE-5129 URL: https://issues.apache.org/jira/browse/CALCITE-5129

Re: Implementing a modifiable adapter

2022-05-03 Thread Mike Hearn
Hey Gavin, Yep, that's me! You say a set of mutable objects, is this something like in-memory > collections? > I'm experimenting with an obscure but fascinating (to me) framework called Permazen: https://github.com/permazen/permazen It's an alternative take on Java persistence - sort of like

Re: Implementing a modifiable adapter

2022-05-03 Thread Gavin Ray
Hey Mike, I can't offer much in the way of experience on the above -- but you may also get pointers if you're able to share an overview of what you're trying to do (if you can disclose) You say a set of mutable objects, is this something like in-memory collections? Also, are you by chance the

Implementing a modifiable adapter

2022-05-03 Thread Mike Hearn
Hello, I'm experimenting with exposing a set of mutable objects via Calcite so I can connect to it and explore/modify the data with tools that speak JDBC like DataGrip. Thanks for Calcite! It looks like exactly what's needed. So far I managed to set up an Avatica server that connects to Calcite

Incorrect Sql2Rel conversion for SELECT DISTINCT .. ORDER BY

2022-05-03 Thread Viliam Durina
Hi all, I have this query: SELECT DISTINCT deptno FROM emp ORDER BY rand() Sql2rel conversion generates the following expression: LogicalProject(DEPTNO=[$0]) LogicalSort(sort0=[$1], dir0=[ASC]) LogicalAggregate(group=[{0, 1}]) LogicalProject(DEPTNO=[$7], EXPR$1=[RAND()])

[jira] [Created] (CALCITE-5128) SQL parser doesn't seem to understand UPDATE statements with fqns

2022-05-03 Thread Mike Hearn (Jira)
Mike Hearn created CALCITE-5128: --- Summary: SQL parser doesn't seem to understand UPDATE statements with fqns Key: CALCITE-5128 URL: https://issues.apache.org/jira/browse/CALCITE-5128 Project: Calcite

Re: Incorrect plan for complex query

2022-05-03 Thread Dmitry Sysolyatin
I found more failing queries but they are not related to unnest. But looks like the cause of both https://issues.apache.org/jira/browse/CALCITE-5127 and those queries is wrong correlate variable's row type. But I am not sure 100%, need an expert :) !use bookstore SELECT array(SELECT lau."books")

REMINDER - Travel Assistance available for ApacheCon NA New Orleans 2022

2022-05-03 Thread Gavin McDonald
Hi All Contributors and Committers, This is a first reminder email that travel assistance applications for ApacheCon NA 2022 are now open! We will be supporting ApacheCon North America in New Orleans, Louisiana, on October 3rd through 6th, 2022. TAC exists to help those that would like to

Re: Incorrect plan for complex query

2022-05-03 Thread Dmitry Sysolyatin
I have created jira task - https://issues.apache.org/jira/browse/CALCITE-5127 And also created a commit with test cases - https://github.com/apache/calcite/commit/27e68ded2c3bea7d7af73dd1dc156e46fb3591a8 On Mon, May 2, 2022 at 6:47 PM Julian Hyde wrote: > Oops, I misspoke. Calcite hasn’t used

[jira] [Created] (CALCITE-5127) Error when executing query with subquery in select list that uses outer column of array type

2022-05-03 Thread Dmitry Sysolyatin (Jira)
Dmitry Sysolyatin created CALCITE-5127: -- Summary: Error when executing query with subquery in select list that uses outer column of array type Key: CALCITE-5127 URL: