gianm opened a new pull request, #20607:
URL: https://github.com/apache/druid/pull/20607
This patch adds the context parameter "sqlTimeCondition", which adds a time
filter to all tables. The filter is ANDed with any other filter that the user
may have provided. The goal of this feature is to enable UIs and APIs to accept
user-written SQL along with having a separate control for time.
This patch also fixes two pre-existing bugs that were discovered while
writing tests for this feature:
1) In some cases, WHERE on time + ORDER BY non-time over a join could
lose the time filter. This is fixed by passing scan.getIntervals()
to WindowOperatorQuery in DruidQuery#toScanAndSortQuery.
testLeftJoinWithTimeFilterAndNonTimeOrderBy is a regression test.
2) The SQL planner would produce "intervals" rather than a __time filter
for certain time filters over a join of a left-hand subquery. This
would cause execution to fail, because execution assumes that
"intervals" are only used for regular tables. This is fixed by
adjusting ExecutionVertexExplorer to avoid traversing through
noncollapsible subqueries, making such a query no longer viewed
by the SQL planner as table-based. The regression test is in
testJoinWithSubqueryOnLeftAndOuterTimeFilter.
--
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]