mirror of https://github.com/apache/druid.git
serialize legacy as false for scan query for rolling downgrade/upgrade (#16793)
Fixes rolling downgrades/upgrades after #16659 by hard coding scan query "legacy":false since it is a required property during deserialization.
This commit is contained in:
parent
c1875e7c1d
commit
14954c7eb9
|
@ -301,15 +301,7 @@ public class SqlMSQStatementResourcePostTest extends MSQTestBase
|
|||
), SqlStatementResourceTest.makeOkRequest());
|
||||
|
||||
Assert.assertEquals(
|
||||
"{PLAN=[{\"query\":"
|
||||
+ "{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],"
|
||||
+ "\"context\":{\"__resultFormat\":\"object\",\"executionMode\":\"ASYNC\",\"scanSignature\":\"[{\\\"name\\\":\\\"__time\\\",\\\"type\\\":\\\"LONG\\\"},{\\\"name\\\":\\\"cnt\\\",\\\"type\\\":\\\"LONG\\\"},{\\\"name\\\":\\\"dim1\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"dim2\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"dim3\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"m1\\\",\\\"type\\\":\\\"FLOAT\\\"},{\\\"name\\\":\\\"m2\\\",\\\"type\\\":\\\"DOUBLE\\\"},{\\\"name\\\":\\\"unique_dim1\\\",\\\"type\\\":\\\"COMPLEX<hyperUnique>\\\"}]\",\"sqlQueryId\":\"queryId\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}],"
|
||||
+ " RESOURCES=[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}],"
|
||||
+ " ATTRIBUTES={\"statementType\":\"SELECT\"}}",
|
||||
"{PLAN=[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"__resultFormat\":\"object\",\"executionMode\":\"ASYNC\",\"scanSignature\":\"[{\\\"name\\\":\\\"__time\\\",\\\"type\\\":\\\"LONG\\\"},{\\\"name\\\":\\\"cnt\\\",\\\"type\\\":\\\"LONG\\\"},{\\\"name\\\":\\\"dim1\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"dim2\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"dim3\\\",\\\"type\\\":\\\"STRING\\\"},{\\\"name\\\":\\\"m1\\\",\\\"type\\\":\\\"FLOAT\\\"},{\\\"name\\\":\\\"m2\\\",\\\"type\\\":\\\"DOUBLE\\\"},{\\\"name\\\":\\\"unique_dim1\\\",\\\"type\\\":\\\"COMPLEX<hyperUnique>\\\"}]\",\"sqlQueryId\":\"queryId\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}], RESOURCES=[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}], ATTRIBUTES={\"statementType\":\"SELECT\"}}",
|
||||
String.valueOf(SqlStatementResourceTest.getResultRowsFromResponse(response).get(0))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -443,6 +443,18 @@ public class ScanQuery extends BaseQuery<ScanResultValue>
|
|||
return columnTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prior to PR https://github.com/apache/druid/pull/16659 (Druid 31) data servers require
|
||||
* the "legacy" parameter to be set to a non-null value. For compatibility with older data
|
||||
* servers during rolling updates, we need to write out "false".
|
||||
*/
|
||||
@Deprecated
|
||||
@JsonProperty("legacy")
|
||||
public Boolean isLegacy()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ordering<ScanResultValue> getResultOrdering()
|
||||
{
|
||||
|
|
|
@ -47,12 +47,7 @@ public class ScanQuerySpecTest
|
|||
+ "\"limit\":3}";
|
||||
|
||||
String current =
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},"
|
||||
+ "\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},"
|
||||
+ "\"resultFormat\":\"list\","
|
||||
+ "\"limit\":3,"
|
||||
+ "\"columns\":[\"market\",\"quality\",\"index\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}}";
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},\"resultFormat\":\"list\",\"limit\":3,\"columns\":[\"market\",\"quality\",\"index\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false}";
|
||||
|
||||
ScanQuery query = new ScanQuery(
|
||||
new TableDataSource(QueryRunnerTestHelper.DATA_SOURCE),
|
||||
|
@ -80,13 +75,7 @@ public class ScanQuerySpecTest
|
|||
public void testSerializationWithTimeOrder() throws Exception
|
||||
{
|
||||
String originalJson =
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},"
|
||||
+ "\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},"
|
||||
+ "\"resultFormat\":\"list\","
|
||||
+ "\"limit\":3,"
|
||||
+ "\"order\":\"ascending\","
|
||||
+ "\"columns\":[\"market\",\"quality\",\"index\",\"__time\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}}";
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},\"resultFormat\":\"list\",\"limit\":3,\"order\":\"ascending\",\"columns\":[\"market\",\"quality\",\"index\",\"__time\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false}";
|
||||
|
||||
ScanQuery expectedQuery = new ScanQuery(
|
||||
new TableDataSource(QueryRunnerTestHelper.DATA_SOURCE),
|
||||
|
@ -118,13 +107,7 @@ public class ScanQuerySpecTest
|
|||
public void testSerializationWithOrderBy() throws Exception
|
||||
{
|
||||
String originalJson =
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},"
|
||||
+ "\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},"
|
||||
+ "\"resultFormat\":\"list\","
|
||||
+ "\"limit\":3,"
|
||||
+ "\"orderBy\":[{\"columnName\":\"quality\",\"order\":\"ascending\"}],"
|
||||
+ "\"columns\":[\"market\",\"quality\",\"index\",\"__time\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}}";
|
||||
"{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"testing\"},\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2011-01-12T00:00:00.000Z/2011-01-14T00:00:00.000Z\"]},\"resultFormat\":\"list\",\"limit\":3,\"orderBy\":[{\"columnName\":\"quality\",\"order\":\"ascending\"}],\"columns\":[\"market\",\"quality\",\"index\",\"__time\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false}";
|
||||
|
||||
ScanQuery expectedQuery = new ScanQuery(
|
||||
new TableDataSource(QueryRunnerTestHelper.DATA_SOURCE),
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
package org.apache.druid.query.scan;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.druid.java.util.common.DateTimes;
|
||||
|
@ -26,8 +28,10 @@ import org.apache.druid.java.util.common.ISE;
|
|||
import org.apache.druid.java.util.common.guava.Sequence;
|
||||
import org.apache.druid.java.util.common.guava.Sequences;
|
||||
import org.apache.druid.query.Druids;
|
||||
import org.apache.druid.query.Query;
|
||||
import org.apache.druid.query.spec.MultipleIntervalSegmentSpec;
|
||||
import org.apache.druid.query.spec.QuerySegmentSpec;
|
||||
import org.apache.druid.segment.TestHelper;
|
||||
import org.apache.druid.segment.column.ColumnHolder;
|
||||
import org.apache.druid.segment.column.ColumnType;
|
||||
import org.apache.druid.segment.column.RowSignature;
|
||||
|
@ -45,6 +49,7 @@ import java.util.Set;
|
|||
|
||||
public class ScanQueryTest
|
||||
{
|
||||
private static final ObjectMapper JSON_MAPPER = TestHelper.makeJsonMapper();
|
||||
private static QuerySegmentSpec intervalSpec;
|
||||
private static ScanResultValue s1;
|
||||
private static ScanResultValue s2;
|
||||
|
@ -94,6 +99,20 @@ public class ScanQueryTest
|
|||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSerdeAndLegacyBackwardsCompat() throws JsonProcessingException
|
||||
{
|
||||
ScanQuery query = Druids.newScanQueryBuilder()
|
||||
.columns(ImmutableList.of("__time", "quality"))
|
||||
.dataSource("source")
|
||||
.intervals(intervalSpec)
|
||||
.build();
|
||||
Assert.assertFalse(query.isLegacy());
|
||||
String json = JSON_MAPPER.writeValueAsString(query);
|
||||
Assert.assertTrue(json.contains("\"legacy\":false"));
|
||||
Assert.assertEquals(query, JSON_MAPPER.readValue(json, Query.class));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testAscendingScanQueryWithInvalidColumns()
|
||||
{
|
||||
|
|
|
@ -40,9 +40,6 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
skipVectorize();
|
||||
|
||||
final String query = "EXPLAIN PLAN FOR SELECT COUNT(*) FROM view.aview WHERE dim1_firstchar <> 'z'";
|
||||
final String legacyExplanation = NullHandling.replaceWithDefault()
|
||||
? "DruidQueryRel(query=[{\"queryType\":\"timeseries\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"filter\":{\"type\":\"and\",\"fields\":[{\"type\":\"selector\",\"dimension\":\"dim2\",\"value\":\"a\"},{\"type\":\"not\",\"field\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"z\",\"extractionFn\":{\"type\":\"substring\",\"index\":0,\"length\":1}}}]},\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{a0:LONG}])\n"
|
||||
: "DruidQueryRel(query=[{\"queryType\":\"timeseries\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"substring(\\\"dim1\\\", 0, 1)\",\"outputType\":\"STRING\"}],\"filter\":{\"type\":\"and\",\"fields\":[{\"type\":\"equals\",\"column\":\"dim2\",\"matchValueType\":\"STRING\",\"matchValue\":\"a\"},{\"type\":\"not\",\"field\":{\"type\":\"equals\",\"column\":\"v0\",\"matchValueType\":\"STRING\",\"matchValue\":\"z\"}}]},\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{a0:LONG}])\n";
|
||||
final String explanation = NullHandling.replaceWithDefault()
|
||||
? "[{"
|
||||
+ "\"query\":{\"queryType\":\"timeseries\","
|
||||
|
@ -70,15 +67,6 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
final String resources = "[{\"name\":\"aview\",\"type\":\"VIEW\"}]";
|
||||
final String attributes = "{\"statementType\":\"SELECT\"}";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
query,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(
|
||||
new Object[]{legacyExplanation, resources, attributes}
|
||||
)
|
||||
);
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
query,
|
||||
|
@ -127,17 +115,6 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
+ " SELECT SUBSTRING(dim1, 1, 1) FROM druid.foo WHERE dim1 IS NOT NULL\n"
|
||||
+ " )\n"
|
||||
+ ")";
|
||||
final String legacyExplanation = NullHandling.replaceWithDefault()
|
||||
?
|
||||
"DruidOuterQueryRel(query=[{\"queryType\":\"timeseries\",\"dataSource\":{\"type\":\"table\",\"name\":\"__subquery__\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{a0:LONG}])\n"
|
||||
+ " DruidJoinQueryRel(condition=[=(SUBSTRING($2, 1, 1), $8)], joinType=[inner], query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"__join__\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"default\",\"dimension\":\"dim2\",\"outputName\":\"d0\",\"outputType\":\"STRING\"}],\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{d0:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}}], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"filter\":{\"type\":\"not\",\"field\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":null}},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"extraction\",\"dimension\":\"dim1\",\"outputName\":\"d0\",\"outputType\":\"STRING\",\"extractionFn\":{\"type\":\"substring\",\"index\":0,\"length\":1}}],\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{d0:STRING}])\n"
|
||||
:
|
||||
"DruidOuterQueryRel(query=[{\"queryType\":\"timeseries\",\"dataSource\":{\"type\":\"table\",\"name\":\"__subquery__\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"granularity\":{\"type\":\"all\"},\"aggregations\":[{\"type\":\"count\",\"name\":\"a0\"}],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{a0:LONG}])\n"
|
||||
+ " DruidJoinQueryRel(condition=[=(SUBSTRING($2, 1, 1), $8)], joinType=[inner], query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"__join__\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"default\",\"dimension\":\"dim2\",\"outputName\":\"d0\",\"outputType\":\"STRING\"}],\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{d0:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}}], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"groupBy\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"filter\":{\"type\":\"not\",\"field\":{\"type\":\"null\",\"column\":\"dim1\"}},\"granularity\":{\"type\":\"all\"},\"dimensions\":[{\"type\":\"extraction\",\"dimension\":\"dim1\",\"outputName\":\"d0\",\"outputType\":\"STRING\",\"extractionFn\":{\"type\":\"substring\",\"index\":0,\"length\":1}}],\"limitSpec\":{\"type\":\"NoopLimitSpec\"},\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}}], signature=[{d0:STRING}])\n";
|
||||
final String explanation = NullHandling.replaceWithDefault() ?
|
||||
"["
|
||||
+ "{\"query\":{\"queryType\":\"groupBy\","
|
||||
|
@ -160,87 +137,20 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
ImmutableList.of(),
|
||||
ImmutableList.of(new Object[]{explanation, resources, attributes})
|
||||
);
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
query,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(new Object[]{legacyExplanation, resources, attributes})
|
||||
);
|
||||
}
|
||||
|
||||
// This testcase has been added here and not in CalciteSelectQueryTest since this checks if the overrides are working
|
||||
// properly when displaying the output of "EXPLAIN PLAN FOR ..." queries
|
||||
@Test
|
||||
public void testExplainSelectStarWithOverrides()
|
||||
public void testExplainSelectStar()
|
||||
{
|
||||
Map<String, Object> useRegularExplainContext = new HashMap<>(QUERY_CONTEXT_DEFAULT);
|
||||
useRegularExplainContext.put(PlannerConfig.CTX_KEY_USE_NATIVE_QUERY_EXPLAIN, true);
|
||||
|
||||
Map<String, Object> legacyExplainContext = new HashMap<>(QUERY_CONTEXT_DEFAULT);
|
||||
legacyExplainContext.put(PlannerConfig.CTX_KEY_USE_NATIVE_QUERY_EXPLAIN, false);
|
||||
|
||||
|
||||
// Skip vectorization since otherwise the "context" will change for each subtest.
|
||||
skipVectorize();
|
||||
String legacyExplanationWithContext = "DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":false,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}}], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n";
|
||||
String explanation = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]"
|
||||
+ "}]";
|
||||
String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
|
||||
String explanationWithContext = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]"
|
||||
+ "}]";
|
||||
String sql = "EXPLAIN PLAN FOR SELECT * FROM druid.foo";
|
||||
String resources = "[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"SELECT\"}";
|
||||
|
||||
// Test when default config and no overrides
|
||||
testQuery(sql, ImmutableList.of(), ImmutableList.of(new Object[]{explanation, resources, attributes}));
|
||||
|
||||
// Test when default config and useNativeQueryExplain is overridden in the context
|
||||
testQuery(
|
||||
sql,
|
||||
legacyExplainContext,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(new Object[]{legacyExplanationWithContext, resources, attributes})
|
||||
);
|
||||
|
||||
// Test when useNativeQueryExplain enabled by default and no overrides
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
sql,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(new Object[]{explanation, resources, attributes})
|
||||
);
|
||||
|
||||
// Test when useNativeQueryExplain enabled by default but is overriden in the context
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
useRegularExplainContext,
|
||||
sql,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(new Object[]{explanationWithContext, resources, attributes})
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -252,46 +162,11 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
final String query = "EXPLAIN PLAN FOR SELECT dim1 FROM druid.foo\n"
|
||||
+ "UNION ALL (SELECT dim1 FROM druid.foo WHERE dim1 = '42'\n"
|
||||
+ "UNION ALL SELECT dim1 FROM druid.foo WHERE dim1 = '44')";
|
||||
final String legacyExplanation = NullHandling.replaceWithDefault()
|
||||
? "DruidUnionRel(limit=[-1])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n"
|
||||
+ " DruidUnionRel(limit=[-1])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n"
|
||||
: "DruidUnionRel(limit=[-1])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n"
|
||||
+ " DruidUnionRel(limit=[-1])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{dim1:STRING}])\n";
|
||||
final String explanation = NullHandling.replaceWithDefault()
|
||||
? "["
|
||||
+ "{"
|
||||
+ "\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]"
|
||||
+ "},"
|
||||
+ "{"
|
||||
+ "\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]"
|
||||
+ "},"
|
||||
+ "{"
|
||||
+ "\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]"
|
||||
+ "}]"
|
||||
: "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]}]";
|
||||
? "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"selector\",\"dimension\":\"dim1\",\"value\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]}]"
|
||||
: "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"42\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]},{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"filter\":{\"type\":\"equals\",\"column\":\"dim1\",\"matchValueType\":\"STRING\",\"matchValue\":\"44\"},\"columns\":[\"dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"dim1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"}]}]";
|
||||
final String resources = "[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"SELECT\"}";
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
query,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(
|
||||
new Object[]{legacyExplanation, resources, attributes}
|
||||
)
|
||||
);
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
query,
|
||||
|
@ -319,23 +194,7 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
defaultExprContext.put(PlannerConfig.CTX_KEY_USE_NATIVE_QUERY_EXPLAIN, true);
|
||||
defaultExprContext.put(PlannerConfig.CTX_KEY_FORCE_EXPRESSION_VIRTUAL_COLUMNS, true);
|
||||
|
||||
final String expectedPlanWithDefaultExpressions = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":["
|
||||
+ "{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"filter((x) -> array_contains(array('true','false'), x), \\\"dim1\\\")\",\"outputType\":\"STRING\"},"
|
||||
+ "{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"filter((x) -> !array_contains(array('true','false'), x), \\\"dim1\\\")\",\"outputType\":\"STRING\"}"
|
||||
+ "],"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"v0\",\"v1\"],"
|
||||
+ ""
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"forceExpressionVirtualColumns\":true,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"STRING\",\"STRING\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"v0\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"EXPR$1\"}]"
|
||||
+ "}]";
|
||||
final String expectedPlanWithDefaultExpressions = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"filter((x) -> array_contains(array('true','false'), x), \\\"dim1\\\")\",\"outputType\":\"STRING\"},{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"filter((x) -> !array_contains(array('true','false'), x), \\\"dim1\\\")\",\"outputType\":\"STRING\"}],\"resultFormat\":\"compactedList\",\"columns\":[\"v0\",\"v1\"],\"context\":{\"defaultTimeout\":300000,\"forceExpressionVirtualColumns\":true,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"v0\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"EXPR$1\"}]}]";
|
||||
final String expectedResources = "[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String expectedAttributes = "{\"statementType\":\"SELECT\"}";
|
||||
testQuery(
|
||||
|
@ -346,23 +205,7 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
);
|
||||
|
||||
// Test plan as mv-filtered virtual columns
|
||||
final String expectedPlanWithMvfiltered = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":["
|
||||
+ "{\"type\":\"mv-filtered\",\"name\":\"v0\",\"delegate\":{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"dim1\",\"outputType\":\"STRING\"},\"values\":[\"true\",\"false\"],\"isAllowList\":true},"
|
||||
+ "{\"type\":\"mv-filtered\",\"name\":\"v1\",\"delegate\":{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"dim1\",\"outputType\":\"STRING\"},\"values\":[\"true\",\"false\"],\"isAllowList\":false}"
|
||||
+ "],"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"v0\",\"v1\"],"
|
||||
+ ""
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"STRING\",\"STRING\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"v0\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"EXPR$1\"}]"
|
||||
+ "}]";
|
||||
final String expectedPlanWithMvfiltered = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"mv-filtered\",\"name\":\"v0\",\"delegate\":{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"dim1\",\"outputType\":\"STRING\"},\"values\":[\"true\",\"false\"],\"isAllowList\":true},{\"type\":\"mv-filtered\",\"name\":\"v1\",\"delegate\":{\"type\":\"default\",\"dimension\":\"dim1\",\"outputName\":\"dim1\",\"outputType\":\"STRING\"},\"values\":[\"true\",\"false\"],\"isAllowList\":false}],\"resultFormat\":\"compactedList\",\"columns\":[\"v0\",\"v1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"v0\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"EXPR$1\"}]}]";
|
||||
final Map<String, Object> mvFilteredContext = new HashMap<>(QUERY_CONTEXT_DEFAULT);
|
||||
mvFilteredContext.put(PlannerConfig.CTX_KEY_USE_NATIVE_QUERY_EXPLAIN, true);
|
||||
|
||||
|
@ -387,22 +230,7 @@ public class CalciteExplainQueryTest extends BaseCalciteQueryTest
|
|||
final Map<String, Object> queryContext = new HashMap<>(QUERY_CONTEXT_DEFAULT);
|
||||
queryContext.put(PlannerConfig.CTX_KEY_USE_NATIVE_QUERY_EXPLAIN, true);
|
||||
|
||||
final String expectedPlan = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":["
|
||||
+ "{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"timestamp_parse(\\\"dim1\\\",null,'UTC')\",\"outputType\":\"LONG\"}"
|
||||
+ "],"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"v0\"],"
|
||||
+ ""
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"v0\",\"type\":\"LONG\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"}]"
|
||||
+ "}]";
|
||||
final String expectedPlan = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"timestamp_parse(\\\"dim1\\\",null,'UTC')\",\"outputType\":\"LONG\"}],\"resultFormat\":\"compactedList\",\"columns\":[\"v0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"useNativeQueryExplain\":true,\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"v0\",\"type\":\"LONG\"}],\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"EXPR$0\"}]}]";
|
||||
final String expectedResources = "[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String expectedAttributes = "{\"statementType\":\"SELECT\"}";
|
||||
// Verify the query plan
|
||||
|
|
|
@ -57,7 +57,6 @@ import org.junit.internal.matchers.ThrowableMessageMatcher;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -742,48 +741,9 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
.columnTypes(ColumnType.LONG, ColumnType.STRING, ColumnType.FLOAT, ColumnType.DOUBLE)
|
||||
.build();
|
||||
|
||||
final String legacyExplanation =
|
||||
"DruidQueryRel(query=["
|
||||
+ queryJsonMapper.writeValueAsString(expectedQuery)
|
||||
+ "], signature=[{__time:LONG, v0:FLOAT, dim1:STRING, v1:DOUBLE}])\n";
|
||||
|
||||
|
||||
// Use testQuery for EXPLAIN (not testIngestionQuery).
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
Collections.emptyList(),
|
||||
sql,
|
||||
CalciteTests.SUPER_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
new DefaultResultsVerifier(
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
),
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
// Test correctness of the query when only the CLUSTERED BY clause is present
|
||||
final String explanation =
|
||||
"["
|
||||
+ "{\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"floor(\\\"m1\\\")\",\"outputType\":\"FLOAT\"},"
|
||||
+ "{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"ceil(\\\"m2\\\")\",\"outputType\":\"DOUBLE\"}],"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},"
|
||||
+ "{\"columnName\":\"v1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"dim1\",\"v0\",\"v1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"FLOAT\",\"DOUBLE\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"v0\",\"type\":\"FLOAT\"},{\"name\":\"dim1\",\"type\":\"STRING\"},"
|
||||
+ "{\"name\":\"v1\",\"type\":\"DOUBLE\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"v0\",\"outputColumn\":\"floor_m1\"},"
|
||||
+ "{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"ceil_m2\"}]"
|
||||
+ "}]";
|
||||
"[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"floor(\\\"m1\\\")\",\"outputType\":\"FLOAT\"},{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"ceil(\\\"m2\\\")\",\"outputType\":\"DOUBLE\"}],\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},{\"columnName\":\"v1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"dim1\",\"v0\",\"v1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"FLOAT\",\"DOUBLE\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"v0\",\"type\":\"FLOAT\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"DOUBLE\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"v0\",\"outputColumn\":\"floor_m1\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"ceil_m2\"}]}]";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
|
@ -835,51 +795,8 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
+ "PARTITIONED BY ALL\n"
|
||||
+ "CLUSTERED BY 2, 3";
|
||||
|
||||
final String legacyExplanation = "DruidQueryRel("
|
||||
+ "query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\","
|
||||
+ "\"inputSource\":{\"type\":\"inline\",\"data\":\"{\\\" \\\": 1681794225551, \\\"namespace\\\": \\\"day1\\\", \\\"country\\\": \\\"one\\\"}\\n"
|
||||
+ "{\\\"__time\\\": 1681794225558, \\\"namespace\\\": \\\"day2\\\", \\\"country\\\": \\\"two\\\"}\"},"
|
||||
+ "\"inputFormat\":{\"type\":\"json\"},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"namespace\",\"type\":\"STRING\"},{\"name\":\"country\",\"type\":\"STRING\"}]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"namespace\",\"order\":\"ascending\"},{\"columnName\":\"country\",\"order\":\"ascending\"}],"
|
||||
+ "\"columns\":[\"__time\",\"country\",\"namespace\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\","
|
||||
+ "\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"}}],"
|
||||
+ " signature=[{__time:LONG, namespace:STRING, country:STRING}])\n";
|
||||
|
||||
// Use testQuery for EXPLAIN (not testIngestionQuery).
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
Collections.emptyList(),
|
||||
sql,
|
||||
CalciteTests.SUPER_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
new DefaultResultsVerifier(
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
),
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
// Test correctness of the query when only the CLUSTERED BY clause is present
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\"," + "\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\","
|
||||
+ "\"data\":\"{\\\" \\\": 1681794225551, \\\"namespace\\\": \\\"day1\\\", \\\"country\\\": \\\"one\\\"}\\n"
|
||||
+ "{\\\"__time\\\": 1681794225558, \\\"namespace\\\": \\\"day2\\\", \\\"country\\\": \\\"two\\\"}\"},"
|
||||
+ "\"inputFormat\":{\"type\":\"json\"},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"namespace\",\"type\":\"STRING\"},{\"name\":\"country\",\"type\":\"STRING\"}]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"namespace\",\"order\":\"ascending\"},{\"columnName\":\"country\",\"order\":\"ascending\"}],"
|
||||
+ "\"columns\":[\"__time\",\"country\",\"namespace\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\","
|
||||
+ "\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"namespace\",\"type\":\"STRING\"},{\"name\":\"country\",\"type\":\"STRING\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"namespace\",\"outputColumn\":\"namespace\"},"
|
||||
+ "{\"queryColumn\":\"country\",\"outputColumn\":\"country\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\",\"data\":\"{\\\" \\\": 1681794225551, \\\"namespace\\\": \\\"day1\\\", \\\"country\\\": \\\"one\\\"}\\n{\\\"__time\\\": 1681794225558, \\\"namespace\\\": \\\"day2\\\", \\\"country\\\": \\\"two\\\"}\"},\"inputFormat\":{\"type\":\"json\"},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"namespace\",\"type\":\"STRING\"},{\"name\":\"country\",\"type\":\"STRING\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"namespace\",\"order\":\"ascending\"},{\"columnName\":\"country\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"country\",\"namespace\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"namespace\",\"type\":\"STRING\"},{\"name\":\"country\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"namespace\",\"outputColumn\":\"namespace\"},{\"queryColumn\":\"country\",\"outputColumn\":\"country\"}]}]";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
|
@ -940,49 +857,9 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
+ "PARTITIONED BY HOUR\n"
|
||||
+ "CLUSTERED BY 1, 2, 3, regionName";
|
||||
|
||||
final String legacyExplanation = "DruidJoinQueryRel(condition=[=($3, $6)], joinType=[left], query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"__join__\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\","
|
||||
+ "\"expression\":\"timestamp_parse(\\\"timestamp\\\",null,'UTC')\",\"outputType\":\"LONG\"}],\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"isRobot\",\"order\":\"ascending\"},"
|
||||
+ "{\"columnName\":\"Capital\",\"order\":\"ascending\"},{\"columnName\":\"regionName\",\"order\":\"ascending\"}],\"columns\":[\"Capital\",\"isRobot\",\"regionName\",\"v0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\","
|
||||
+ "\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"}}], signature=[{v0:LONG, isRobot:STRING, Capital:STRING, regionName:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://boo.gz\"]},\"inputFormat\":{\"type\":\"json\"},"
|
||||
+ "\"signature\":[{\"name\":\"isRobot\",\"type\":\"STRING\"},{\"name\":\"timestamp\",\"type\":\"STRING\"},{\"name\":\"cityName\",\"type\":\"STRING\"},{\"name\":\"countryIsoCode\",\"type\":\"STRING\"},{\"name\":\"regionName\",\"type\":\"STRING\"}]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"cityName\",\"countryIsoCode\",\"isRobot\",\"regionName\",\"timestamp\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"STRING\",\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{isRobot:STRING, timestamp:STRING, cityName:STRING, countryIsoCode:STRING, regionName:STRING}])\n"
|
||||
+ " DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://foo.tsv\"]},\"inputFormat\":{\"type\":\"tsv\",\"delimiter\":\"\\t\",\"findColumnsFromHeader\":true},"
|
||||
+ "\"signature\":[{\"name\":\"Country\",\"type\":\"STRING\"},{\"name\":\"Capital\",\"type\":\"STRING\"},{\"name\":\"ISO3\",\"type\":\"STRING\"},{\"name\":\"ISO2\",\"type\":\"STRING\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"columns\":[\"Capital\",\"ISO2\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"}}], signature=[{Capital:STRING, ISO2:STRING}])\n";
|
||||
// Use testQuery for EXPLAIN (not testIngestionQuery).
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
Collections.emptyList(),
|
||||
sql,
|
||||
CalciteTests.SUPER_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
new DefaultResultsVerifier(
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
),
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
// Test correctness of the query when only the CLUSTERED BY clause is present
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"join\",\"left\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://boo.gz\"]},\"inputFormat\":{\"type\":\"json\"}"
|
||||
+ ",\"signature\":[{\"name\":\"isRobot\",\"type\":\"STRING\"},{\"name\":\"timestamp\",\"type\":\"STRING\"},{\"name\":\"cityName\",\"type\":\"STRING\"},{\"name\":\"countryIsoCode\",\"type\":\"STRING\"},"
|
||||
+ "{\"name\":\"regionName\",\"type\":\"STRING\"}]},\"right\":{\"type\":\"query\",\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://foo.tsv\"]},\"inputFormat\":{\"type\":\"tsv\",\"delimiter\":\"\\t\",\"findColumnsFromHeader\":true},"
|
||||
+ "\"signature\":[{\"name\":\"Country\",\"type\":\"STRING\"},{\"name\":\"Capital\",\"type\":\"STRING\"},{\"name\":\"ISO3\",\"type\":\"STRING\"},{\"name\":\"ISO2\",\"type\":\"STRING\"}]},\"intervals\":{\"type\":\"intervals\","
|
||||
+ "\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"Capital\",\"ISO2\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\","
|
||||
+ "\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"}}},\"rightPrefix\":\"j0.\",\"condition\":\"(\\\"countryIsoCode\\\" == \\\"j0.ISO2\\\")\",\"joinType\":\"LEFT\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"timestamp_parse(\\\"timestamp\\\",null,'UTC')\",\"outputType\":\"LONG\"}],\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"isRobot\",\"order\":\"ascending\"},"
|
||||
+ "{\"columnName\":\"j0.Capital\",\"order\":\"ascending\"},{\"columnName\":\"regionName\",\"order\":\"ascending\"}],\"columns\":[\"isRobot\",\"j0.Capital\",\"regionName\",\"v0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\","
|
||||
+ "\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"v0\",\"type\":\"LONG\"},{\"name\":\"isRobot\",\"type\":\"STRING\"},{\"name\":\"j0.Capital\",\"type\":\"STRING\"},{\"name\":\"regionName\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"__time\"},"
|
||||
+ "{\"queryColumn\":\"isRobot\",\"outputColumn\":\"isRobotAlias\"},{\"queryColumn\":\"j0.Capital\",\"outputColumn\":\"countryCapital\"},{\"queryColumn\":\"regionName\",\"outputColumn\":\"regionName\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"join\",\"left\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://boo.gz\"]},\"inputFormat\":{\"type\":\"json\"},\"signature\":[{\"name\":\"isRobot\",\"type\":\"STRING\"},{\"name\":\"timestamp\",\"type\":\"STRING\"},{\"name\":\"cityName\",\"type\":\"STRING\"},{\"name\":\"countryIsoCode\",\"type\":\"STRING\"},{\"name\":\"regionName\",\"type\":\"STRING\"}]},\"right\":{\"type\":\"query\",\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"https://foo.tsv\"]},\"inputFormat\":{\"type\":\"tsv\",\"delimiter\":\"\\t\",\"findColumnsFromHeader\":true},\"signature\":[{\"name\":\"Country\",\"type\":\"STRING\"},{\"name\":\"Capital\",\"type\":\"STRING\"},{\"name\":\"ISO3\",\"type\":\"STRING\"},{\"name\":\"ISO2\",\"type\":\"STRING\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"Capital\",\"ISO2\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false}},\"rightPrefix\":\"j0.\",\"condition\":\"(\\\"countryIsoCode\\\" == \\\"j0.ISO2\\\")\",\"joinType\":\"LEFT\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"timestamp_parse(\\\"timestamp\\\",null,'UTC')\",\"outputType\":\"LONG\"}],\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"isRobot\",\"order\":\"ascending\"},{\"columnName\":\"j0.Capital\",\"order\":\"ascending\"},{\"columnName\":\"regionName\",\"order\":\"ascending\"}],\"columns\":[\"isRobot\",\"j0.Capital\",\"regionName\",\"v0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"v0\",\"type\":\"LONG\"},{\"name\":\"isRobot\",\"type\":\"STRING\"},{\"name\":\"j0.Capital\",\"type\":\"STRING\"},{\"name\":\"regionName\",\"type\":\"STRING\"}],\"columnMappings\":[{\"queryColumn\":\"v0\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"isRobot\",\"outputColumn\":\"isRobotAlias\"},{\"queryColumn\":\"j0.Capital\",\"outputColumn\":\"countryCapital\"},{\"queryColumn\":\"regionName\",\"outputColumn\":\"regionName\"}]}]";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
|
@ -1274,7 +1151,7 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExplainInsertFromExternal() throws IOException
|
||||
public void testExplainInsertFromExternal()
|
||||
{
|
||||
// Skip vectorization since otherwise the "context" will change for each subtest.
|
||||
skipVectorize();
|
||||
|
@ -1284,62 +1161,12 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
externSql(externalDataSource)
|
||||
);
|
||||
|
||||
ObjectMapper queryJsonMapper = queryFramework().queryJsonMapper();
|
||||
final ScanQuery expectedQuery = newScanQueryBuilder()
|
||||
.dataSource(externalDataSource)
|
||||
.intervals(querySegmentSpec(Filtration.eternity()))
|
||||
.columns("x", "y", "z")
|
||||
.context(
|
||||
queryJsonMapper.readValue(
|
||||
"{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}",
|
||||
JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT
|
||||
)
|
||||
)
|
||||
.columnTypes(STRING, STRING, LONG)
|
||||
.build();
|
||||
|
||||
final String legacyExplanation =
|
||||
"DruidQueryRel(query=["
|
||||
+ queryJsonMapper.writeValueAsString(expectedQuery)
|
||||
+ "], signature=[{x:STRING, y:STRING, z:LONG}])\n";
|
||||
|
||||
final String explanation =
|
||||
"["
|
||||
+ "{\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\",\"data\":\"a,b,1\\nc,d,2\\n\"},"
|
||||
+ "\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},"
|
||||
+ "\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]"
|
||||
+ "}]";
|
||||
"[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\",\"data\":\"a,b,1\\nc,d,2\\n\"},\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}],\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]}]";
|
||||
|
||||
final String resources = "[{\"name\":\"EXTERNAL\",\"type\":\"EXTERNAL\"},{\"name\":\"dst\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"INSERT\",\"targetDataSource\":\"dst\",\"partitionedBy\":{\"type\":\"all\"}}";
|
||||
|
||||
// Use testQuery for EXPLAIN (not testIngestionQuery).
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
Collections.emptyList(),
|
||||
query,
|
||||
CalciteTests.SUPER_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
new DefaultResultsVerifier(
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
),
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
|
@ -1397,51 +1224,12 @@ public class CalciteInsertDmlTest extends CalciteIngestionDmlTest
|
|||
.columnTypes(LONG, STRING, FLOAT, DOUBLE)
|
||||
.build();
|
||||
|
||||
|
||||
final String legacyExplanation =
|
||||
"DruidQueryRel(query=["
|
||||
+ queryJsonMapper.writeValueAsString(expectedQuery)
|
||||
+ "], signature=[{__time:LONG, v0:FLOAT, dim1:STRING, v1:DOUBLE}])\n";
|
||||
|
||||
final String explanation =
|
||||
"["
|
||||
+ "{\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"floor(\\\"m1\\\")\",\"outputType\":\"FLOAT\"},"
|
||||
+ "{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"ceil(\\\"m2\\\")\",\"outputType\":\"DOUBLE\"}],"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},"
|
||||
+ "{\"columnName\":\"v1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"dim1\",\"v0\",\"v1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"FLOAT\",\"DOUBLE\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"v0\",\"type\":\"FLOAT\"},{\"name\":\"dim1\",\"type\":\"STRING\"},"
|
||||
+ "{\"name\":\"v1\",\"type\":\"DOUBLE\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"v0\",\"outputColumn\":\"floor_m1\"},"
|
||||
+ "{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"ceil_m2\"}]"
|
||||
+ "}]";
|
||||
"[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"virtualColumns\":[{\"type\":\"expression\",\"name\":\"v0\",\"expression\":\"floor(\\\"m1\\\")\",\"outputType\":\"FLOAT\"},{\"type\":\"expression\",\"name\":\"v1\",\"expression\":\"ceil(\\\"m2\\\")\",\"outputType\":\"DOUBLE\"}],\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"v0\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},{\"columnName\":\"v1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"dim1\",\"v0\",\"v1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"STRING\",\"FLOAT\",\"DOUBLE\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"v0\",\"type\":\"FLOAT\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"v1\",\"type\":\"DOUBLE\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"v0\",\"outputColumn\":\"floor_m1\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"v1\",\"outputColumn\":\"ceil_m2\"}]}]";
|
||||
|
||||
final String resources = "[{\"name\":\"dst\",\"type\":\"DATASOURCE\"},{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"INSERT\",\"targetDataSource\":\"dst\",\"partitionedBy\":\"DAY\",\"clusteredBy\":[\"floor_m1\",\"dim1\",\"CEIL(\\\"m2\\\")\"]}";
|
||||
|
||||
// Use testQuery for EXPLAIN (not testIngestionQuery).
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
Collections.emptyList(),
|
||||
query,
|
||||
CalciteTests.SUPER_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
new DefaultResultsVerifier(
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
),
|
||||
null
|
||||
)
|
||||
);
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
ImmutableMap.of("sqlQueryId", "dummy"),
|
||||
|
|
|
@ -699,20 +699,7 @@ public class CalciteReplaceDmlTest extends CalciteIngestionDmlTest
|
|||
+ queryJsonMapper.writeValueAsString(expectedQuery)
|
||||
+ "], signature=[{x:STRING, y:STRING, z:LONG}])\n";
|
||||
|
||||
final String explanation = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\",\"data\":\"a,b,1\\nc,d,2\\n\"},"
|
||||
+ "\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},"
|
||||
+ "\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\","
|
||||
+ "\"sqlReplaceTimeChunks\":\"all\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]}]";
|
||||
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"inline\",\"data\":\"a,b,1\\nc,d,2\\n\"},\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"sqlReplaceTimeChunks\":\"all\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}],\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]}]";
|
||||
final String resources = "[{\"name\":\"EXTERNAL\",\"type\":\"EXTERNAL\"},{\"name\":\"dst\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"REPLACE\",\"targetDataSource\":\"dst\",\"partitionedBy\":{\"type\":\"all\"},\"replaceTimeChunks\":\"all\"}";
|
||||
|
||||
|
@ -790,7 +777,7 @@ public class CalciteReplaceDmlTest extends CalciteIngestionDmlTest
|
|||
+ "], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n";
|
||||
|
||||
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"dim1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"sqlReplaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"orderBy\":[{\"columnName\":\"dim1\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"DAY\\\"\",\"sqlQueryId\":\"dummy\",\"sqlReplaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String resources = "[{\"name\":\"dst\",\"type\":\"DATASOURCE\"},{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"REPLACE\",\"targetDataSource\":\"dst\",\"partitionedBy\":\"DAY\",\"clusteredBy\":[\"dim1\"],\"replaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\"}";
|
||||
|
||||
|
@ -875,24 +862,7 @@ public class CalciteReplaceDmlTest extends CalciteIngestionDmlTest
|
|||
+ queryJsonMapper.writeValueAsString(expectedQuery)
|
||||
+ "], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n";
|
||||
|
||||
final String explanation = "["
|
||||
+ "{\"query\":{\"queryType\":\"scan\",\"dataSource\":"
|
||||
+ "{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\","
|
||||
+ "\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\",\"limit\":10,"
|
||||
+ "\"orderBy\":[{\"columnName\":\"__time\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},"
|
||||
+ "{\"columnName\":\"dim3\",\"order\":\"ascending\"},{\"columnName\":\"dim2\",\"order\":\"ascending\"}],"
|
||||
+ "\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\","
|
||||
+ "\"sqlReplaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\",\"vectorize\":\"false\","
|
||||
+ "\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],"
|
||||
+ "\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},"
|
||||
+ "{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},"
|
||||
+ "{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},"
|
||||
+ "{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"limit\":10,\"orderBy\":[{\"columnName\":\"__time\",\"order\":\"ascending\"},{\"columnName\":\"dim1\",\"order\":\"ascending\"},{\"columnName\":\"dim3\",\"order\":\"ascending\"},{\"columnName\":\"dim2\",\"order\":\"ascending\"}],\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"\\\"HOUR\\\"\",\"sqlQueryId\":\"dummy\",\"sqlReplaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String resources = "[{\"name\":\"dst\",\"type\":\"DATASOURCE\"},{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"REPLACE\",\"targetDataSource\":\"dst\",\"partitionedBy\":\"HOUR\","
|
||||
+ "\"clusteredBy\":[\"__time\",\"dim1\",\"dim3\",\"dim2\"],\"replaceTimeChunks\":\"2000-01-01T00:00:00.000Z/2000-01-02T00:00:00.000Z\"}";
|
||||
|
|
|
@ -595,35 +595,10 @@ public class CalciteSelectQueryTest extends BaseCalciteQueryTest
|
|||
// Skip vectorization since otherwise the "context" will change for each subtest.
|
||||
skipVectorize();
|
||||
final String query = "EXPLAIN PLAN FOR SELECT 1 + 1";
|
||||
final String explanation = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"inline\",\"columnNames\":[\"EXPR$0\"],\"columnTypes\":[\"LONG\"],\"rows\":[[2]]},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"EXPR$0\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"EXPR$0\",\"type\":\"LONG\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"EXPR$0\",\"outputColumn\":\"EXPR$0\"}]"
|
||||
+ "}]";
|
||||
final String legacyExplanation = "DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"inline\",\"columnNames\":[\"EXPR$0\"],\"columnTypes\":[\"LONG\"],\"rows\":[[2]]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"EXPR$0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\"],\"granularity\":{\"type\":\"all\"}}], signature=[{EXPR$0:LONG}])\n";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"inline\",\"columnNames\":[\"EXPR$0\"],\"columnTypes\":[\"LONG\"],\"rows\":[[2]]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"EXPR$0\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"EXPR$0\",\"type\":\"LONG\"}],\"columnMappings\":[{\"queryColumn\":\"EXPR$0\",\"outputColumn\":\"EXPR$0\"}]}]";
|
||||
final String resources = "[]";
|
||||
final String attributes = "{\"statementType\":\"SELECT\"}";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
query,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
)
|
||||
);
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
query,
|
||||
|
@ -1330,33 +1305,10 @@ public class CalciteSelectQueryTest extends BaseCalciteQueryTest
|
|||
skipVectorize();
|
||||
|
||||
final String query = "EXPLAIN PLAN FOR SELECT * FROM druid.foo";
|
||||
final String legacyExplanation = "DruidQueryRel(query=[{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}}], signature=[{__time:LONG, dim1:STRING, dim2:STRING, dim3:STRING, cnt:LONG, m1:FLOAT, m2:DOUBLE, unique_dim1:COMPLEX<hyperUnique>}])\n";
|
||||
final String explanation = "[{"
|
||||
+ "\"query\":{\"queryType\":\"scan\","
|
||||
+ "\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},"
|
||||
+ "\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},"
|
||||
+ "\"resultFormat\":\"compactedList\","
|
||||
+ "\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],"
|
||||
+ "\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},"
|
||||
+ "\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"}},"
|
||||
+ "\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],"
|
||||
+ "\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"table\",\"name\":\"foo\"},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"__time\",\"cnt\",\"dim1\",\"dim2\",\"dim3\",\"m1\",\"m2\",\"unique_dim1\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"LONG\",\"LONG\",\"STRING\",\"STRING\",\"STRING\",\"FLOAT\",\"DOUBLE\",\"COMPLEX<hyperUnique>\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"__time\",\"type\":\"LONG\"},{\"name\":\"dim1\",\"type\":\"STRING\"},{\"name\":\"dim2\",\"type\":\"STRING\"},{\"name\":\"dim3\",\"type\":\"STRING\"},{\"name\":\"cnt\",\"type\":\"LONG\"},{\"name\":\"m1\",\"type\":\"FLOAT\"},{\"name\":\"m2\",\"type\":\"DOUBLE\"},{\"name\":\"unique_dim1\",\"type\":\"COMPLEX<hyperUnique>\"}],\"columnMappings\":[{\"queryColumn\":\"__time\",\"outputColumn\":\"__time\"},{\"queryColumn\":\"dim1\",\"outputColumn\":\"dim1\"},{\"queryColumn\":\"dim2\",\"outputColumn\":\"dim2\"},{\"queryColumn\":\"dim3\",\"outputColumn\":\"dim3\"},{\"queryColumn\":\"cnt\",\"outputColumn\":\"cnt\"},{\"queryColumn\":\"m1\",\"outputColumn\":\"m1\"},{\"queryColumn\":\"m2\",\"outputColumn\":\"m2\"},{\"queryColumn\":\"unique_dim1\",\"outputColumn\":\"unique_dim1\"}]}]";
|
||||
final String resources = "[{\"name\":\"foo\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"SELECT\"}";
|
||||
|
||||
testQuery(
|
||||
PLANNER_CONFIG_LEGACY_QUERY_EXPLAIN,
|
||||
query,
|
||||
CalciteTests.REGULAR_USER_AUTH_RESULT,
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(
|
||||
new Object[]{
|
||||
legacyExplanation,
|
||||
resources,
|
||||
attributes
|
||||
}
|
||||
)
|
||||
);
|
||||
testQuery(
|
||||
PLANNER_CONFIG_NATIVE_QUERY_EXPLAIN,
|
||||
query,
|
||||
|
|
|
@ -313,19 +313,7 @@ public class IngestTableFunctionTest extends CalciteIngestionDmlTest
|
|||
" format => 'csv'))\n" +
|
||||
" EXTEND (x VARCHAR, y VARCHAR, z BIGINT)\n" +
|
||||
"PARTITIONED BY ALL TIME";
|
||||
final String explanation = "[{" +
|
||||
"\"query\":{\"queryType\":\"scan\"," +
|
||||
"\"dataSource\":{\"type\":\"external\"," +
|
||||
"\"inputSource\":{\"type\":\"http\",\"uris\":[\"http://foo.com/bar.csv\"],\"httpAuthenticationUsername\":\"bob\",\"httpAuthenticationPassword\":{\"type\":\"default\",\"password\":\"secret\"}}," +
|
||||
"\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]}," +
|
||||
"\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]}," +
|
||||
"\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"]," +
|
||||
"\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\"," +
|
||||
"\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\"," +
|
||||
"\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"}," +
|
||||
"\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"}}," +
|
||||
"\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]," +
|
||||
"\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]}]";
|
||||
final String explanation = "[{\"query\":{\"queryType\":\"scan\",\"dataSource\":{\"type\":\"external\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"http://foo.com/bar.csv\"],\"httpAuthenticationUsername\":\"bob\",\"httpAuthenticationPassword\":{\"type\":\"default\",\"password\":\"secret\"}},\"inputFormat\":{\"type\":\"csv\",\"columns\":[\"x\",\"y\",\"z\"]},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}]},\"intervals\":{\"type\":\"intervals\",\"intervals\":[\"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z\"]},\"resultFormat\":\"compactedList\",\"columns\":[\"x\",\"y\",\"z\"],\"context\":{\"defaultTimeout\":300000,\"maxScatterGatherBytes\":9223372036854775807,\"sqlCurrentTimestamp\":\"2000-01-01T00:00:00Z\",\"sqlInsertSegmentGranularity\":\"{\\\"type\\\":\\\"all\\\"}\",\"sqlQueryId\":\"dummy\",\"vectorize\":\"false\",\"vectorizeVirtualColumns\":\"false\"},\"columnTypes\":[\"STRING\",\"STRING\",\"LONG\"],\"granularity\":{\"type\":\"all\"},\"legacy\":false},\"signature\":[{\"name\":\"x\",\"type\":\"STRING\"},{\"name\":\"y\",\"type\":\"STRING\"},{\"name\":\"z\",\"type\":\"LONG\"}],\"columnMappings\":[{\"queryColumn\":\"x\",\"outputColumn\":\"x\"},{\"queryColumn\":\"y\",\"outputColumn\":\"y\"},{\"queryColumn\":\"z\",\"outputColumn\":\"z\"}]}]";
|
||||
final String resources = "[{\"name\":\"EXTERNAL\",\"type\":\"EXTERNAL\"},{\"name\":\"dst\",\"type\":\"DATASOURCE\"}]";
|
||||
final String attributes = "{\"statementType\":\"INSERT\",\"targetDataSource\":\"dst\",\"partitionedBy\":{\"type\":\"all\"}}";
|
||||
|
||||
|
|
|
@ -104,7 +104,8 @@ select v.*,e.* from v inner join e on (e.cityName = v.cityName);
|
|||
"columnTypes" : [ "LONG", "STRING", "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
LogicalProject(cityName=[$0], cnt=[$1], cityName0=[$2], cnt0=[$3])
|
||||
|
|
|
@ -42,7 +42,8 @@ select cityName, countryName from wikipedia where cityName='New York' limit 1;
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
LogicalSort(fetch=[1])
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -82,7 +82,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -107,7 +108,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -83,7 +83,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -109,7 +110,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -85,7 +85,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -110,7 +111,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -86,7 +86,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -112,7 +113,8 @@ DruidAggregate(group=[{0}], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -60,7 +60,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -80,6 +81,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -60,7 +60,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -80,6 +81,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "FLOAT", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(m1=[$0], k=[$2], v=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "FLOAT" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -63,7 +63,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -83,6 +84,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -66,7 +66,8 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], k=[$3], v=[$4], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -75,7 +75,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -100,7 +101,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -122,6 +124,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -76,7 +76,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -102,7 +103,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -124,6 +126,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -75,7 +75,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -100,7 +101,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -122,6 +124,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -76,7 +76,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -102,7 +103,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -124,6 +126,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -104,6 +104,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -107,6 +107,7 @@ DruidProject(dim1=[$0], dim2=[$1], v=[$3], v0=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -70,7 +70,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -86,6 +87,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -89,6 +90,7 @@ DruidProject(dim1=[$0], dim2=[$1], sk=[$3], druid=[logical])
|
|||
"columnTypes" : [ "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3, $4)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3, $4)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3, $4)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -73,7 +73,8 @@ DruidAggregate(group=[{0, 1}], EXPR$2=[ANY_VALUE($2, $3, $4)], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING", "FLOAT", "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -62,7 +62,8 @@ DruidAggregate(group=[{}], EXPR$0=[COUNT() FILTER $0], druid=[logical])
|
|||
"columnTypes" : [ "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -70,7 +70,8 @@ DruidAggregate(group=[{}], EXPR$0=[COUNT() FILTER $0], druid=[logical])
|
|||
"columnTypes" : [ "LONG" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -79,7 +79,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -105,7 +106,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -127,6 +129,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
|
@ -78,7 +78,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"right" : {
|
||||
|
@ -103,7 +104,8 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
},
|
||||
"rightPrefix" : "j0.",
|
||||
|
@ -125,6 +127,7 @@ DruidProject(dim1=[CAST('10.1':VARCHAR):VARCHAR], __time=[$1], druid=[logical])
|
|||
"columnTypes" : [ "LONG", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
}
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue