tls-applied opened a new issue, #16560:
URL: https://github.com/apache/druid/issues/16560
### Description
Sample query:
```sql
SELECT
JSON_VALUE(a.data, b.path)
FROM (
VALUES
(PARSE_JSON('{"x": 1}'))
) a(data)
CROSS JOIN (
VALUES
('$.x')
) b(path)
```
Relevant errors:
```
2024-06-05T21:36:40,185 WARN [sql[67983b92-e41d-4933-be2e-a172b0f43148]]
org.apache.druid.sql.calcite.planner.QueryHandler - Query not supported. Please
check Broker logs for additional details. SQL was: SELECT
JSON_VALUE(a.data, b.path)
FROM
(
VALUES
(PARSE_JSON('{"x": 1}'))
) a(data)
CROSS JOIN (
VALUES
('$.x')
) b(path)
LIMIT 11 (org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There
are not enough rules to produce a node with desired properties:
convention=DRUID, sort=[].
Missing conversion is LogicalSort[convention: NONE -> DRUID]
There is 1 empty subset: rel#53574:Subset#5.DRUID.[], the relevant part of
the original plan is as follows
53572:LogicalSort(fetch=[11])
53570:LogicalProject(subset=[rel#53571:Subset#4.NONE.[]],
EXPR$0=[CAST(JSON_VALUE_VARCHAR($0, $1)):VARCHAR(2000)])
53568:LogicalJoin(subset=[rel#53569:Subset#3.NONE.[]], condition=[true],
joinType=[inner])
53565:LogicalProject(subset=[rel#53566:Subset#1.NONE.[]],
EXPR$0=[PARSE_JSON('{"x": 1}')])
53537:LogicalValues(subset=[rel#53564:Subset#0.NONE.[0]], tuples=[[{
0 }]])
53539:LogicalValues(subset=[rel#53567:Subset#2.NONE.[0]], tuples=[[{
'$.x' }]])
Root: rel#53574:Subset#5.DRUID.[]
Original rel:
LogicalSort(subset=[rel#53574:Subset#5.DRUID.[]], fetch=[11]): rowcount =
1.0, cumulative cost = {1.0 rows, 4.0 cpu, 0.0 io}, id = 53572
LogicalProject(subset=[rel#53571:Subset#4.NONE.[]],
EXPR$0=[CAST(JSON_VALUE_VARCHAR($0, $1)):VARCHAR(2000)]): rowcount = 1.0,
cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 53570
LogicalJoin(subset=[rel#53569:Subset#3.NONE.[]], condition=[true],
joinType=[inner]): rowcount = 1.0, cumulative cost = {1.0 rows, 0.0 cpu, 0.0
io}, id = 53568
LogicalProject(subset=[rel#53566:Subset#1.NONE.[]],
EXPR$0=[PARSE_JSON('{"x": 1}')]): rowcount = 1.0, cumulative cost = {1.0 rows,
1.0 cpu, 0.0 io}, id = 53565
LogicalValues(subset=[rel#53564:Subset#0.NONE.[0]], tuples=[[{ 0
}]]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 53537
LogicalValues(subset=[rel#53567:Subset#2.NONE.[0]], tuples=[[{ '$.x'
}]]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 53539
)
```
Is this expected to fail and is there a way to work around it?
### Affected Version
26.0.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]