[jira] [Created] (CALCITE-6170) Invalid

2023-12-19 Thread Egor Ryashin (Jira)
Egor Ryashin created CALCITE-6170: - Summary: Invalid Key: CALCITE-6170 URL: https://issues.apache.org/jira/browse/CALCITE-6170 Project: Calcite Issue Type: Bug Components: avatica

Re: avatica-go: resultset offset management

2023-11-28 Thread Egor Ryashin
; argument and the jira case is subsequently closed, there’s no shame in that. >> Julian >>> On Nov 27, 2023, at 10:59 AM, Egor Ryashin wrote: >>> >>> Hi all, >>> >>> this exception happens when Apache Druid Avatica protobuf endpoint is used: >

[jira] [Created] (CALCITE-6139) Avatica-Go sends the same offset for the FetchRequest

2023-11-28 Thread Egor Ryashin (Jira)
Egor Ryashin created CALCITE-6139: - Summary: Avatica-Go sends the same offset for the FetchRequest Key: CALCITE-6139 URL: https://issues.apache.org/jira/browse/CALCITE-6139 Project: Calcite

avatica-go: resultset offset management

2023-11-27 Thread Egor Ryashin
Hi all, this exception happens when Apache Druid Avatica protobuf endpoint is used: "Druid can only fetch forward. Requested offset”. I tried to debug that and saw that any simple query fails if it triggers fetching of multiple frames. I speculate that when the first ExucuteRequest is sent

[jira] [Created] (CALCITE-6108) SQL request to Avatica-Go returns 0s for float types

2023-11-11 Thread Egor Ryashin (Jira)
Egor Ryashin created CALCITE-6108: - Summary: SQL request to Avatica-Go returns 0s for float types Key: CALCITE-6108 URL: https://issues.apache.org/jira/browse/CALCITE-6108 Project: Calcite

Re: JOIN and "Type mismatch: rowtype of new rel: RecordType ... NOT NULL rowtype of set"

2023-11-09 Thread Egor Ryashin
a certain calcite version > are given, > we can easily draw from the commit/code history which commit, which version > introduced the problem or it has never worked correctly. > > Best Regards, > Ran Tao > > > Egor Ryashin 于2023年11月9日周四 18:10写道: > >> FYI, it’s

Re: JOIN and "Type mismatch: rowtype of new rel: RecordType ... NOT NULL rowtype of set"

2023-11-09 Thread Egor Ryashin
ce this problem. Ideally convert it to run on a > built-in schema such as Scott (emp and dept tables). This will help someone > fix the case, help someone suggest a workaround, and help others identify > that they are hitting the same issue. > >> On Nov 6, 2023, at 3:51 AM, E

JOIN and "Type mismatch: rowtype of new rel: RecordType ... NOT NULL rowtype of set"

2023-11-06 Thread Egor Ryashin
Hi all, I’ve just run into this exception: Type mismatch: rowtype of new rel: RecordType(VARCHAR pub, VARCHAR pub0, DOUBLE NOT NULL $f2) NOT NULL rowtype of set: RecordType(VARCHAR pub, VARCHAR pub0, DOUBLE rate) NOT NULL executing this SQL: SELECT base."pub”, Any_valu

[jira] [Created] (CALCITE-6067) Casting to FLOAT data type fails

2023-10-23 Thread Egor Ryashin (Jira)
Egor Ryashin created CALCITE-6067: - Summary: Casting to FLOAT data type fails Key: CALCITE-6067 URL: https://issues.apache.org/jira/browse/CALCITE-6067 Project: Calcite Issue Type: Bug

Re: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Float

2023-10-20 Thread Egor Ryashin
I will use `double` as workaround for now, I wonder how to write a unit test that can catch it? > On 20 Oct 2023, at 14:06, Egor Ryashin wrote: > > so, this works (with double): > SELECT > cast(1.0 as double) m3 > from "wikipedia" > >> O

Re: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Float

2023-10-20 Thread Egor Ryashin
so, this works (with double): SELECT cast(1.0 as double) m3 from "wikipedia" > On 20 Oct 2023, at 14:01, Egor Ryashin wrote: > > what I see in the debugger > > >> On 19 Oct 2023, at 18:47, Egor Ryashin wrote: >> >> There wa

Re: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Float

2023-10-19 Thread Egor Ryashin
There wasn't one On Thu, Oct 19, 2023, 18:32 Mihai Budiu wrote: > Can you provide a stack trace? > ____ > From: Egor Ryashin > Sent: Thursday, October 19, 2023 6:47:48 AM > To: dev@calcite.apache.org > Subject: ClassCastException: class j

ClassCastException: class java.lang.Long cannot be cast to class java.lang.Float

2023-10-19 Thread Egor Ryashin
Hi all, I have a strange error using Apache Druid avatica protobuf endpoint. I send this query: SELECT "user", cast("added" as float) m3 from "wikipedia" limit 10 and get this: ClassCastException: class java.lang.Long cannot be cast to class java.lang.Float (java.lang.Long and java.lang.Float ar

validation for multiple statements

2022-08-23 Thread Egor Ryashin
Hi all, I try to use validation with multi-statement AST but it fails when I call validate() with NPE about namespace, I wonder how should I set this namespace: NlsString ';' BigDecimal 1 Exception in thread "main" java.lang.NullPointerException: namespace for SELECT ';', scope org.apache.calcit

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Egor Ryashin
true, the version was rather old, thank you. > On 18 Aug 2022, at 02:12, Benchao Li wrote: > > Egor, > > What's the Calcite version are you using? > I tried your code in 1.30.0 and 1.31.0, they both work fine. > > Egor Ryashin 于2022年8月17日周三 22:40写道: > >&g

IndexOutOfBoundException, WITH and JOIN

2022-08-17 Thread Egor Ryashin
Hi all, I’m trying to figure out why this conversion fails: WITH `A` AS (SELECT `TABLE_NAME` FROM `main`.`TABLES`), `B` AS (SELECT 'k' AS `K`) (SELECT * FROM `A` INNER JOIN `B` ON `A`.`TABLE_NAME` = `B`.`K`) Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 1 out of bounds fo

JSON based Schema

2022-08-08 Thread Egor Ryashin
Hi all, I wonder if there’s any known project that can deserialize a schema object from a JSON file? I’m doing the same right now but don’t want to reinvent the wheel accidentally.

jdbc schema with postgres system catalogs

2022-07-28 Thread Egor Ryashin
Hi all, i’m trying to validate a sql query against a Postgres database, probably I understand something incorrectly but I cannot find a good description how to reference Postgres system catalogs, I try different variations of this code but it fails: Connection connection = DriverManager.getCon

calcite+graal native-image

2022-07-19 Thread Egor Ryashin
Hi all, I’ve been trying to build a native executable with GraalVM and got stuck with this exception when running the executable: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.calcite.rel.metadata.janino.GeneratedMetadata_CollationHandler at org.apache.calcit

[jira] [Created] (CALCITE-3002) Case statement fails with: SqlValidatorException: Cannot apply '=' to arguments of type ' = '.

2019-04-15 Thread Egor Ryashin (JIRA)
Egor Ryashin created CALCITE-3002: - Summary: Case statement fails with: SqlValidatorException: Cannot apply '=' to arguments of type ' = '. Key: CALCITE-3002 URL: https://issues.apache.org