Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public ListenableFuture<Void> runTask(String taskId, Object taskObject)
throw new ISE(e, "Unable to run");
}
finally {
if (controller != null && queryListener != null) {
if (queryListener != null && queryListener.reportMap != null) {
reports.put(controller.queryId(), queryListener.getReportMap());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public void close()
{
if (closed.compareAndSet(false, true)) {
inMemoryWorkers.forEach((k, v) -> v.stop());
inMemoryWorkers.clear();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ protected Worker newWorker(String workerId)
catch (Exception e) {
throw new RuntimeException(e);
}
finally {
inMemoryWorkers.remove(workerId);
}
});

return worker;
Expand Down
11 changes: 10 additions & 1 deletion quidem-ut/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@
<type>test-jar</type>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.apache.druid.extensions</groupId>
<artifactId>druid-multi-stage-query</artifactId>
<type>test-jar</type>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.druid.extensions</groupId>
<artifactId>druid-datasketches</artifactId>
Expand Down Expand Up @@ -514,6 +519,10 @@
<artifactId>hamcrest-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
46 changes: 46 additions & 0 deletions quidem-ut/src/test/quidem/org.apache.druid.quidem.QTest/dart1.iq
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
!set dartQueryId 00000000-0000-0000-0000-000000000000
!use druidtest://?componentSupplier=DartComponentSupplier
!set outputformat mysql

select * from numfoo;
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
| __time | dim1 | dim2 | dim3 | dim4 | dim5 | dim6 | dbl1 | dbl2 | f1 | f2 | l1 | l2 | cnt | m1 | m2 | unique_dim1 |
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
| 2000-01-01 00:00:00.000 | | a | ["a","b"] | a | aa | 1 | 1.0 | | 1.0 | | 7 | | 1 | 1.0 | 1.0 | "AQAAAEAAAA==" |
| 2000-01-02 00:00:00.000 | 10.1 | | ["b","c"] | a | ab | 2 | 1.7 | 1.7 | 0.1 | 0.1 | 325323 | 325323 | 1 | 2.0 | 2.0 | "AQAAAQAAAAHNBA==" |
| 2001-01-01 00:00:00.000 | 1 | a | | b | ad | 4 | | | | | | | 1 | 4.0 | 4.0 | "AQAAAQAAAAFREA==" |
| 2001-01-02 00:00:00.000 | def | abc | | b | aa | 5 | | | | | | | 1 | 5.0 | 5.0 | "AQAAAQAAAACyEA==" |
| 2001-01-03 00:00:00.000 | abc | | | b | ab | 6 | | | | | | | 1 | 6.0 | 6.0 | "AQAAAQAAAAEkAQ==" |
| 2000-01-03 00:00:00.000 | 2 | | d | a | ba | 3 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 1 | 3.0 | 3.0 | "AQAAAQAAAAOzAg==" |
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
(6 rows)

!ok
select * from numfoo;
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
| __time | dim1 | dim2 | dim3 | dim4 | dim5 | dim6 | dbl1 | dbl2 | f1 | f2 | l1 | l2 | cnt | m1 | m2 | unique_dim1 |
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
| 2000-01-01 00:00:00.000 | | a | ["a","b"] | a | aa | 1 | 1.0 | | 1.0 | | 7 | | 1 | 1.0 | 1.0 | "AQAAAEAAAA==" |
| 2000-01-02 00:00:00.000 | 10.1 | | ["b","c"] | a | ab | 2 | 1.7 | 1.7 | 0.1 | 0.1 | 325323 | 325323 | 1 | 2.0 | 2.0 | "AQAAAQAAAAHNBA==" |
| 2000-01-03 00:00:00.000 | 2 | | d | a | ba | 3 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | 0 | 1 | 3.0 | 3.0 | "AQAAAQAAAAOzAg==" |
| 2001-01-01 00:00:00.000 | 1 | a | | b | ad | 4 | | | | | | | 1 | 4.0 | 4.0 | "AQAAAQAAAAFREA==" |
| 2001-01-02 00:00:00.000 | def | abc | | b | aa | 5 | | | | | | | 1 | 5.0 | 5.0 | "AQAAAQAAAACyEA==" |
| 2001-01-03 00:00:00.000 | abc | | | b | ab | 6 | | | | | | | 1 | 6.0 | 6.0 | "AQAAAQAAAAEkAQ==" |
+-------------------------+------+------+-----------+------+------+------+------+------+-----+-----+--------+--------+-----+-----+-----+--------------------+
(6 rows)

!ok
select length(dim1) from numfoo;
+--------+
| EXPR$0 |
+--------+
| 0 |
| 1 |
| 1 |
| 3 |
| 3 |
| 4 |
+--------+
(6 rows)

!ok