Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL support for time-ordered scan #7373

Merged
merged 7 commits into from
Apr 2, 2019

Conversation

justinborromeo
Copy link
Contributor

@justinborromeo justinborromeo commented Mar 28, 2019

Fixes #7370 and addresses #6088

This change makes the SQL planner use scan queries instead of select queries for time-ordered SELECT SQL statements. Since there are no other uses for select queries, select is removed completely from the SQL planner. The Calcite tests were modified to reflect this change.

The test segment walker for the calcite query tests needed to be changed since time-ordered scan queries only accept specific segment specs, not multiple interval segment specs like what was used before. If the received query is an instanceof ScanQuery and has an order that != none, a copy of the query will be used with a new multiple segment spec instead of the existing interval spec.

commit 287a367
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 27 20:03:41 2019 -0700

    Implemented Clint's recommendations

commit 07503ea
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 27 17:49:09 2019 -0700

    doc fix

commit 231a72e
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 27 17:38:20 2019 -0700

    Modified sequence limit to accept longs and added test for long limits

commit 1df50de
Merge: 480e932 c7fea6a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 26 15:23:01 2019 -0700

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 480e932
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 26 14:58:04 2019 -0700

    Checkstyle and doc update

commit 487f31f
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 26 14:39:25 2019 -0700

    Refixed regression

commit fb858ef
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 26 13:14:48 2019 -0700

    Added test for n-way merge

commit 376e8bf
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 26 11:42:54 2019 -0700

    Refactor n-way merge

commit 8a6bb11
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 17:17:41 2019 -0700

    Fix docs and flipped boolean in ScanQueryLimitRowIterator

commit 3569268
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 16:15:49 2019 -0700

    Fix bug messing up count of rows

commit 219af47
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 15:57:55 2019 -0700

    Fix bug in numRowsScanned

commit da4fc66
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 15:19:45 2019 -0700

    Check type of segment spec before using for time ordering

commit b822fc7
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 13:19:02 2019 -0700

    Revert "Merge branch '6088-Time-Ordering-On-Scans-N-Way-Merge' of github.com:justinborromeo/incubator-druid into 6088-Time-Ordering-On-Scans-N-Way-Merge"

    This reverts commit 57033f3, reversing
    changes made to 8f01d8d.

commit 57033f3
Merge: 8f01d8d 86d9730
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 13:13:52 2019 -0700

    Merge branch '6088-Time-Ordering-On-Scans-N-Way-Merge' of github.com:justinborromeo/incubator-druid into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 8f01d8d
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 13:13:32 2019 -0700

    Revert "Fixed failing tests -> allow usage of all types of segment spec"

    This reverts commit ec47028.

commit ec47028
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 11:01:35 2019 -0700

    Fixed failing tests -> allow usage of all types of segment spec

commit 86d9730
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 25 11:01:35 2019 -0700

    Fixed failing tests -> allow usage of all types of segment spec

commit 8b3b6b5
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 22 16:01:56 2019 -0700

    Nit comment

commit a87d021
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 22 15:54:42 2019 -0700

    Fix checkstyle and test

commit 62dceda
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 22 15:30:41 2019 -0700

    More comments

commit 1b46b58
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 22 15:19:52 2019 -0700

    Added a bit of docs

commit 4947216
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 22 10:27:41 2019 -0700

    Rename segment limit -> segment partitions limit

commit 43d490c
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Mar 21 13:16:58 2019 -0700

    Optimized n-way merge strategy

commit 42f5246
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 20 17:40:19 2019 -0700

    Smarter limiting for pQueue method

commit 4823dab
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 20 16:05:53 2019 -0700

    Finish rename

commit 2528a56
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 18 14:00:50 2019 -0700

    Renaming

commit 7bfa77d
Merge: a032c46 7e49d47
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 12 16:57:45 2019 -0700

    Merge branch 'Update-Query-Interrupted-Exception' into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 7e49d47
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 12 16:51:25 2019 -0700

    Added error message for UOE

commit a032c46
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 12 16:47:17 2019 -0700

    Updated error message

commit 57b5682
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 12 12:44:02 2019 -0700

    Fixed tests

commit 45e95bb
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Mar 12 11:09:08 2019 -0700

    Optimization

commit cce917a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 8 14:11:07 2019 -0800

    Checkstyle fix

commit 73f4038
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Mar 7 18:40:00 2019 -0800

    Applied Jon's recommended changes

commit fb966de
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Mar 7 11:03:01 2019 -0800

    Sorry, checkstyle

commit 6dc53b3
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Mar 6 10:34:13 2019 -0800

    Improved test and appeased TeamCity

commit 35c96d3
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 4 16:00:44 2019 -0800

    Checkstyle fix

commit 2d1978d
Merge: 83ec3fe 3398d39
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Mar 4 15:24:49 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 83ec3fe
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 1 13:40:22 2019 -0800

    Nit-change on javadoc

commit 47c970b
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Mar 1 13:38:29 2019 -0800

    Wrote tests and added Javadoc

commit 5ff59f5
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 28 15:58:20 2019 -0800

    Reset config

commit 806166f
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 28 15:49:07 2019 -0800

    Fixed failing tests

commit de83b11
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 26 16:40:48 2019 -0800

    Fixed mistakes in merge

commit 5bd0e1a
Merge: 18cce9a 9fa649b
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 26 16:39:16 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 18cce9a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 26 13:16:44 2019 -0800

    Change so batching only occurs on broker for time-ordered scans

    Restricted batching to broker for time-ordered queries and adjusted
    tests

    Formatting

    Cleanup

commit 451e2b4
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 26 11:14:27 2019 -0800

    WIP

commit 69b24bd
Merge: 763c43d 417b9f2
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 18:13:26 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-N-Way-Merge

commit 763c43d
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 18:07:06 2019 -0800

    Multi-historical setup works

commit 06a5218
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 16:59:57 2019 -0800

    Wrote docs

commit 3b923da
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 14:03:22 2019 -0800

    Fixed bug introduced by replacing deque with list

commit 023538d
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 13:30:08 2019 -0800

    Sequence stuff is so dirty :(

commit e1fc295
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 22 10:39:59 2019 -0800

    WIP

commit f57ff25
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 21 18:22:06 2019 -0800

    Ordering is correct on n-way merge -> still need to batch events into
    ScanResultValues

commit 1813a54
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 21 17:06:18 2019 -0800

    Cleanup

commit f83e996
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 21 16:56:36 2019 -0800

    Refactor and pQueue works

commit b13ff62
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 21 15:13:33 2019 -0800

    Set up time ordering strategy decision tree

commit fba6b02
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 21 15:08:27 2019 -0800

    Added config and get # of segments

commit c9142e7
Merge: cd489a0 554b014
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 20 10:12:50 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-V2

commit cd489a0
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 20 00:16:48 2019 -0800

    Fixed failing test due to null resultFormat

commit 7baeade
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 19 17:52:06 2019 -0800

    Changes based on Gian's comments

commit 35150fe
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 15 15:57:53 2019 -0800

    Small changes

commit 4e69276
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 11 12:09:54 2019 -0800

    Removed unused import to satisfy PMD check

commit ecb0f48
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 11 10:37:11 2019 -0800

    improved doc

commit f0eddee
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 11 10:18:45 2019 -0800

    Added more javadoc

commit 5f92dd7
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 11 10:05:58 2019 -0800

    Unused import

commit 93e1636
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 11 10:03:14 2019 -0800

    Added javadoc on ScanResultValueTimestampComparator

commit 134041c
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 8 13:13:54 2019 -0800

    Renamed sort function

commit 2e3577c
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 7 13:01:25 2019 -0800

    Fixed benchmark queries

commit d3b335a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 7 11:08:07 2019 -0800

    added all query types to scan benchmark

commit ab00ead
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Thu Feb 7 09:42:48 2019 -0800

    Kicking travis with change to benchmark param

commit b432bea
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 17:45:59 2019 -0800

    Fixed failing calcite tests

commit b2c8c77
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 17:39:48 2019 -0800

    Fixing tests WIP

commit 85e72a6
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 15:42:02 2019 -0800

    Set to spaces over tabs

commit 7e872a8
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 15:36:24 2019 -0800

    Created an error message for when someone tries to time order a result
    set > threshold limit

commit e8a4b49
Merge: 305876a 8e3a58f
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 15:05:11 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-V2

commit 305876a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 15:02:02 2019 -0800

    nit

commit 8212a21
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 14:40:35 2019 -0800

    Improved conciseness

commit 10b5e0c
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 13:42:12 2019 -0800

    .

commit dfe4aa9
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 13:41:18 2019 -0800

    Fixed codestyle and forbidden API errors

commit 148939e
Merge: 4f51024 5edbe2a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 13:26:17 2019 -0800

    Merge branch '6088-Create-Scan-Benchmark' into 6088-Time-Ordering-On-Scans-V2

commit 5edbe2a
Merge: 60b7684 315ccb7
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 13:18:55 2019 -0800

    Merge github.com:apache/incubator-druid into 6088-Create-Scan-Benchmark

commit 60b7684
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 13:02:13 2019 -0800

    Committing a param change to kick teamcity

commit 4f51024
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 12:08:12 2019 -0800

    Wrote more tests for scan result value sort

commit 8b7d5f5
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Wed Feb 6 11:55:09 2019 -0800

    Wrote tests for heapsort scan result values and fixed bug where iterator
    wasn't returning elements in correct order

commit b6d4df3
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 16:45:20 2019 -0800

    Decrease segment size for less memory usage

commit d1a1793
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 12:40:26 2019 -0800

    nit

commit 7deb06f
Merge: b7d3a49 86c5eee
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 10:53:38 2019 -0800

    Merge branch '6088-Create-Scan-Benchmark' into 6088-Time-Ordering-On-Scans-V2

commit 86c5eee
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 10:31:27 2019 -0800

    Broke some long lines into two lines

commit b7d3a49
Merge: 796083f 8bc5eaa
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 10:23:32 2019 -0800

    Merge branch 'master' into 6088-Time-Ordering-On-Scans-V2

commit 737a833
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Tue Feb 5 10:15:32 2019 -0800

    Made Jon's changes and removed TODOs

commit 796083f
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 15:37:42 2019 -0800

    Benchmark param change

commit 20c3664
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 15:36:35 2019 -0800

    More param changes

commit 9e6e716
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 15:31:21 2019 -0800

    Changed benchmark params

commit 01b25ed
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 14:36:18 2019 -0800

    Added time ordering to the scan benchmark

commit 432acaf
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 12:03:14 2019 -0800

    Change number of benchmark iterations

commit 12e51a2
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 12:02:13 2019 -0800

    Added TimestampComparator tests

commit e66339c
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 10:56:41 2019 -0800

    Remove todos

commit ad731a3
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 10:55:56 2019 -0800

    Change benchmark

commit 989bd2d
Merge: 7b58471 26930f8
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Mon Feb 4 10:46:38 2019 -0800

    Merge branch '6088-Create-Scan-Benchmark' into 6088-Time-Ordering-On-Scans-V2

commit 7b58471
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Sat Feb 2 03:48:18 2019 -0800

    Licensing stuff

commit 79e8319
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 18:22:58 2019 -0800

    Move ScanResultValue timestamp comparator to a separate class for testing

commit 7a6080f
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 18:00:58 2019 -0800

    Stuff for time-ordered scan query

commit 26930f8
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 16:38:49 2019 -0800

    It runs.

commit dd4ec1a
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 15:12:17 2019 -0800

    Need to form queries

commit dba6e49
Merge: 10e57d5 7d4cc28
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 14:13:39 2019 -0800

    Merge branch 'master' into 6088-Create-Scan-Benchmark

commit 10e57d5
Author: Justin Borromeo <jborrome@edu.uwaterloo.ca>
Date:   Fri Feb 1 14:04:13 2019 -0800

    Moved Scan Builder to Druids class and started on Scan Benchmark setup
@justinborromeo justinborromeo changed the title [WIP] SQL support for time-ordered scan SQL support for time-ordered scan Mar 31, 2019
Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, few formatting issues

final String outputNamePrefix = Calcites.findUnusedPrefix("d", new TreeSet<>(querySignature.getRowSignature().getRowOrder()));
final String outputNamePrefix = Calcites.findUnusedPrefix(
"d",
new TreeSet<>(querySignature.getRowSignature()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this treeset declaration can be on one line

final String outputNamePrefix = Calcites.findUnusedPrefix("a", new TreeSet<>(querySignature.getRowSignature().getRowOrder()));
final String outputNamePrefix = Calcites.findUnusedPrefix(
"a",
new TreeSet<>(querySignature.getRowSignature()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

ScanQuery.Order order;
if (limitSpec == null || limitSpec.getColumns().size() == 0) {
order = ScanQuery.Order.NONE;
} else if (limitSpec.getColumns().get(0).getDirection() == OrderByColumnSpec.Direction.ASCENDING) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit of a tangent, but why again did we add a new ScanQuery.Order instead of re-using OrderByColumnSpec stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we decided on adding a ScanQuery.Order enum because OrderByColumnSpec didn't really support a no-ordering case. See #7133 (comment)

@@ -157,7 +155,8 @@ public void testSelectCountStart() throws Exception
CalciteTests.REGULAR_USER_AUTH_RESULT,
ImmutableList.of(Druids.newTimeseriesQueryBuilder()
.dataSource(CalciteTests.DATASOURCE1)
.intervals(querySegmentSpec(Intervals.of("2999-01-01T00:00:00.000Z/146140482-04-24T15:36:27.903Z")))
.intervals(querySegmentSpec(Intervals.of(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting here also doesn't fit style guide, closing parens should be on own line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, Intellij's autoformatter with the Druid style doesn't pick that up.

Query<T> query1 = queryPlus.getQuery();
Query<T> newQuery1 = query1;
if (query instanceof ScanQuery && ((ScanQuery) query).getOrder() != ScanQuery.Order.NONE) {
newQuery1 = (Query<T>) Druids.ScanQueryBuilder.copy((ScanQuery) query)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting here also seems off

Copy link
Contributor

@jon-wei jon-wei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jon-wei jon-wei merged commit 4584b5e into apache:master Apr 2, 2019
@justinborromeo justinborromeo deleted the SQL-Time-Order-Scan branch April 4, 2019 23:34
@jon-wei jon-wei added this to the 0.15.0 milestone Apr 4, 2019
gianm added a commit to gianm/druid that referenced this pull request Apr 11, 2019
Select queries can no longer be generated, since apache#7373.
@clintropolis clintropolis mentioned this pull request Oct 25, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants