Repository navigation
Fix the druid json_object issue - #16592
AlbericByte wants to merge 2 commits into
Conversation
|
So to resolve this problem, we need to update the calcite to a release that includes your fix? |
|
can we add a test case? |
|
@FrankChen021, @kgyrtkirk and @cryptoe |
|
So you want all functions to work with equalsIgnoreCase ?
|
|
I wonder why can't we simply use the I've done a quick check with a testcase in I'm not sure if other tests will pass with this change...but ...other way around could be to somehow get rid of the |
May i know what is your idea of SqlStdOperator versions solution? |
| ); | ||
| } | ||
| }) | ||
| .returnTypeInference(NESTED_RETURN_TYPE_INFERENCE) |
There was a problem hiding this comment.
the are some differences between these functions....most importantly the return type is different; the SqlStdOp returns VARCHAR ; meanwhile this function was returning NESTED_DATA
there are also some test failures; one is CalciteNestedDataQueryTest.testJsonQueryAndJsonObject
There was a problem hiding this comment.
@kgyrtkirk @cryptoe and @FrankChen021 i try to use the original OperatorConversions(not SqlStdOperatorTable.JSON_OBJECT)
and during plan process, original JsonObjectOperatorConversion will add new virtualColumn base on the Expression.
but for the BindablesQuery, we have different plan process and not add virtualColumn base on the Expression, so it will go to calcite json_object, then we have this runtime error for any BindablesQuery which use json_object.
Please let me know your idea, i need your help to fix this issue.
|
@kgyrtkirk i have try to add some calcite rule for plan, but it still need to get sqlfunction from rextableimp, i do not have any other work around now, i am open if someone can provide idea or continue to work on this, i can monitor and learn. |
|
I think that getting rid of the bindables mode might just make this and possibly other issues go away... I was looking around a bit and I think you will get similar issues for all the functions inside to address that I think the following might be considered:
I would preffer (2) as I have a feeling that (1) might be quite tricky.... I'll try to think about further alternatives/ideas/etc cc: @gianm |
|
@kgyrtkirk thanks let me know your solution, i will try this week. |
FrankChen021
left a comment
There was a problem hiding this comment.
MergeLens review deferred: this PR currently has a definite merge conflict with master.
Current head: JSON_OBJECT at f381515a8dc255e742ef1cfd4f2f86dc7220d6a0.
Please resolve the conflicts with master and push a new head so the code can be reviewed. Reviewed 0 files; review was deferred because the PR conflicts with master.
This is an automated review by Codex GPT-5.6-Luna(max)
All druid native functions do not work on system table and information_schema tables, this has been a problem when these tables were first introduced, and has never been addressed. In #20183 , I add the native table support for system tables, and based on that , information_schema table can also be migrated to the native query path. I hope we can review and merge it soon( I expect it can be merged in 39 release). For this PR, I will close it. |
Fixes #16356.
Description
the dependence calcite cr need to be review
the root case is that the operator is SqlFunction, but in the map, the key instance is SqlJsonObjectFunction, the type is not equals, so we can naver get from the map in the following code:
Fixed the bug ...
Release note
Fix the SQL JSON_OBJECT() function results in RUNTIME_FAILURE when querying INFORMATION_SCHEMA.COLUMNS
Key changed/added classes in this PR
NestedDataOperatorConversions.javaThis PR has: