Try ‘value ((‘ in place of ‘value (‘.
Julian
> On Feb 21, 2022, at 9:33 AM, Gavin Ray wrote:
>
> I hadn't thought about the fact that ORM's probably have to solve this
> problem as well
> That is a great suggestion, I will try to investigate some of the popular
> ORM codebases and see if ther
Hi Xu,
sorry for late response. I read the code in org.apache.calcite.test.ServerTest,
along with help from Julian, now the problem has been solved.
According to Julian, I replaced the value of parserFactory
"org.apache.calcite.sql.parser.ddl.SqlDdlParserImpl#FACTORY" with
"org.apache.calcite.s
Hi Julian,
It works! Thank you very much!
From: Julian Hyde
Date: 2022-02-23 10:01
To: dev
Subject: Re: DDL support issues in Calcite
Looks like you need to be using ServerDdlExecutor rather than
DdlExecutor.USELESS.
Therefore try using org.apache.calcite.server.ServerDdlExecutor#PARSER_FACTO
ChenKai created CALCITE-5019:
Summary: Avoid multiple scans when table is
ProjectableFilterableTable
Key: CALCITE-5019
URL: https://issues.apache.org/jira/browse/CALCITE-5019
Project: Calcite
Is
Hi Oualid,
It's not completely clear what your request is but keep in mind that
Sqlline [1] (which you probably used in the tutorial) is an SQL client like
Dbeaver/Squirrel etc.
The tutorial also provides some examples with the jdbcurl, username,
password. Keep in mind that whatever SQL client you
Xiabo,
Your code seems to work for me, I ran the test case and it passes, see the
image below:
https://i.imgur.com/D0ajyQH.png
On Wed, Feb 23, 2022 at 2:33 AM xiaobo wrote:
> we have put the test coding on github
>
>
> https://github.com/guxiaobo/calcite-json-adapter/tree/main/src/test/java/or
No dice still unfortunately =/
If it's any easier, I put a self-contained single class reproduction on
Github:
https://github.com/GavinRay97/calcite-nested-json-subquery-bug/blob/main/src/test/java/com/example/AppTest.java
Is it worth filing a JIRA ticket over you think?
On Wed, Feb 23, 2022 at
It’s a parser error. That usually means that the user has made a mistake.
Try your SQL on another DB with JSON support before you declare this a Calcite
bug.
Julian
> On Feb 23, 2022, at 09:22, Gavin Ray wrote:
>
> No dice still unfortunately =/
>
> If it's any easier, I put a self-contai
That's a valid point, let me see check what some common dialects will
accept for this sort of thing
On Wed, Feb 23, 2022 at 12:36 PM Julian Hyde wrote:
> It’s a parser error. That usually means that the user has made a mistake.
>
> Try your SQL on another DB with JSON support before you declare
I think this actually is a bug in Calcite's parser or it's interpretation
I tested on H2, Oracle, and MySQL, the below is valid on those DB's but
fails on Calcite's parser:
=
H2/Oracle
=
SELECT
"houses"."id" AS "id",
"houses"."address" AS "address",
(
Sorry, I realized this might be a time investment to try to debug/reproduce
So I found a website that let me create the schema, rows, and query on
various DB's
Here is an example on Oracle and MySQL that you can view/modify in your
browser:
ORACLE:
https://dbfiddle.uk/?rdbms=oracle_21&fiddle=2eed
Okay, I think maybe I have an idea what is going on
The parser grammar for "JsonNameAndValue":
https://github.com/apache/calcite/blob/82dd78a14f6aef2eeec2f9c94978d04b4acc5359/core/src/main/codegen/templates/Parser.jj#L6267-L6296
Has:
e = Expression(ExprContext.ACCEPT_NON_QUERY)
This enum value a
Oh wow, that fixed it!
I changed that line in the parser to be Expression(ExprContext.ACCEPT_ALL)
And now my nested JSON queries work!
The minimal reproduction is:
SELECT JSON_OBJECT(
KEY 'id'
VALUE (SELECT 1)
)
+--+
| EXPR$0 |
+--+
| {"id":1} |
+--+
1 row sele
Well actually, there is one exception -- there's a small bug with the
output being improperly escaped but that bug is already on JIRA and seems
much easier to approach.
https://issues.apache.org/jira/browse/CALCITE-4989
On Wed, Feb 23, 2022 at 6:46 PM Gavin Ray wrote:
> Oh wow, that fixed it!
>
Zhengqiang Duan created CALCITE-5020:
Summary: ResultSetMetaData.getColumnLabel should return columnName
when not use column alias
Key: CALCITE-5020
URL: https://issues.apache.org/jira/browse/CALCITE-5020
When trying to map Java Float Objects to SQL Float, we faild with the following
, it seems calcite is trying to convert Float objects to Double even when we
expect it to be a float ( we fetch it through getFloat method of resultset ).
java.lang.ClassCastException: class java.lang.Float cannot b
SQL’s FLOAT type (aka DOUBLE) corresponds to Java’s double.
SQL’s REAL type corresponds to Java’s float.
JDBC method names (e.g. getFloat, getDouble) refer to the Java types.
Julian
> On Feb 23, 2022, at 10:33 PM, xiaobo wrote:
>
> When trying to map Java Float Objects to SQL Float, we fai
17 matches
Mail list logo