You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/05/19 16:53:57 UTC
[GitHub] [druid] gianm opened a new issue #9896: Remove Bindable query path
gianm opened a new issue #9896:
URL: https://github.com/apache/druid/issues/9896
Remove the Bindable query path, meaning all SQL queries can be executed as native queries (or a sequence of concatenated native queries, in the case of UNION ALL). Currently, this path is used for the `sys` and `INFORMATION_SCHEMA` schemas.
This would allow simplifying the DruidPlanner, as well as joining across these disparate schemas, in case you wanted to do that for some reason.
The approach that comes to mind first is to have the SQL layer generate lazy inline datasources for these special tables using `InlineDataSource.fromIterable`. We need to make sure we don't blow through memory or other resources limits while doing this. (The current Bindable stuff has no resource-limiting facility, so this would be an improvement.)
I believe the main prerequisite here is supporting `ORDER BY` on non-aggregating queries, meaning adding sort-by-non-time to the Scan query. It's possible that we could start this off by only supporting it for cases where there is just a single segment involved in the query. I believe this would cover the `sys` and `INFORMATION_SCHEMA` cases.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] weishiuntsai edited a comment on issue #9896: Remove Bindable query path
Posted by GitBox <gi...@apache.org>.
weishiuntsai edited a comment on issue #9896:
URL: https://github.com/apache/druid/issues/9896#issuecomment-638947396
Druid currently can't build a plan for the following join query when the WHERE clause evaluates to FALSE. By removing the bindable query path can help with this too:
```
SELECT COUNT(DISTINCT T1.tab0s1)
FROM tab0 as T1 LEFT JOIN tab0 as T2
on T1.__time = T2.__time
WHERE (1=0)
```
```
Unknown exception / Cannot build plan for query: SELECT COUNT(DISTINCT T1.tab0s1) FROM tab0 as T1 LEFT JOIN tab0 as T2 on T1.__time = T2.__time WHERE (1=0) / org.apache.druid.java.util.common.ISE
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] weishiuntsai edited a comment on issue #9896: Remove Bindable query path
Posted by GitBox <gi...@apache.org>.
weishiuntsai edited a comment on issue #9896:
URL: https://github.com/apache/druid/issues/9896#issuecomment-638947396
Druid currently can't build a plan for the following join query with COUNT(DISTINCT) when the WHERE clause evaluates to FALSE. By removing the bindable query path can help with this too:
```
SELECT COUNT(DISTINCT T1.tab0s1)
FROM tab0 as T1 LEFT JOIN tab0 as T2
on T1.__time = T2.__time
WHERE (1=0)
```
```
Unknown exception / Cannot build plan for query: SELECT COUNT(DISTINCT T1.tab0s1) FROM tab0 as T1 LEFT JOIN tab0 as T2 on T1.__time = T2.__time WHERE (1=0) / org.apache.druid.java.util.common.ISE
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] weishiuntsai edited a comment on issue #9896: Remove Bindable query path
Posted by GitBox <gi...@apache.org>.
weishiuntsai edited a comment on issue #9896:
URL: https://github.com/apache/druid/issues/9896#issuecomment-638947396
Druid currently can't build a plan for the following join query with `COUNT(DISTINCT)` when the `WHERE` clause evaluates to `FALSE`. By removing the bindable query path can help with this too:
```
SELECT COUNT(DISTINCT T1.tab0s1)
FROM tab0 as T1 LEFT JOIN tab0 as T2
on T1.__time = T2.__time
WHERE (1=0)
```
```
Unknown exception / Cannot build plan for query: SELECT COUNT(DISTINCT T1.tab0s1) FROM tab0 as T1 LEFT JOIN tab0 as T2 on T1.__time = T2.__time WHERE (1=0) / org.apache.druid.java.util.common.ISE
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] weishiuntsai commented on issue #9896: Remove Bindable query path
Posted by GitBox <gi...@apache.org>.
weishiuntsai commented on issue #9896:
URL: https://github.com/apache/druid/issues/9896#issuecomment-638947396
Druid currently can't build a plan for the following join query when the WHERE clause evaluates to FALSE. By removing the bindable query path can help with this too:
```
SELECT COUNT(DISTINCT T1.tab0s1)
FROM tab0 as T1 LEFT JOIN tab0 as T2
on T1.__time = T2.__time
WHERE (1=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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org