mirror of
https://github.com/apache/druid.git
synced 2025-03-09 02:54:17 +00:00
updates
This commit is contained in:
parent
9448ed3825
commit
9afdfb2dcf
@ -4754,6 +4754,7 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
||||
);
|
||||
}
|
||||
|
||||
@DecoupledTestConfig(quidemReason = QuidemTestCaseReason.IMPROVED_PLAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestThriceWithFiltersOnDimAndAllUnnestColumnsArrayColumns()
|
||||
{
|
||||
@ -4821,6 +4822,7 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
||||
);
|
||||
}
|
||||
|
||||
@DecoupledTestConfig(quidemReason = QuidemTestCaseReason.IMPROVED_PLAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestThriceWithFiltersOnDimAndUnnestColumnsORCombinations()
|
||||
{
|
||||
@ -6416,6 +6418,7 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
||||
);
|
||||
}
|
||||
|
||||
@DecoupledTestConfig(quidemReason = QuidemTestCaseReason.IMPROVED_PLAN)
|
||||
@Test
|
||||
public void testUnnestWithGroupByHavingSelector()
|
||||
{
|
||||
@ -6555,6 +6558,7 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
||||
);
|
||||
}
|
||||
|
||||
@DecoupledTestConfig(quidemReason = QuidemTestCaseReason.IMPROVED_PLAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestWithGroupByHavingWithWhereOnUnnestCol()
|
||||
{
|
||||
@ -6614,6 +6618,7 @@ public class CalciteArraysQueryTest extends BaseCalciteQueryTest
|
||||
);
|
||||
}
|
||||
|
||||
@DecoupledTestConfig(quidemReason = QuidemTestCaseReason.IMPROVED_PLAN, separateDefaultModeTest = true)
|
||||
@Test
|
||||
public void testUnnestWithGroupByHavingWithWhereOnUnnestArrayCol()
|
||||
{
|
||||
|
@ -0,0 +1,128 @@
|
||||
# testUnnestThriceWithFiltersOnDimAndAllUnnestColumnsArrayColumns@NullHandling=sql case-crc:84cffaf8
|
||||
# quidem testcase reason: IMPROVED_PLAN
|
||||
!set debug true
|
||||
!set defaultTimeout 300000
|
||||
!set maxScatterGatherBytes 9223372036854775807
|
||||
!set plannerStrategy DECOUPLED
|
||||
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
|
||||
!set sqlQueryId dummy
|
||||
!set sqlStringifyArrays false
|
||||
!set outputformat mysql
|
||||
!use druidtest:///
|
||||
SELECT arrayString, uln, udn, usn FROM
|
||||
( SELECT * FROM
|
||||
( SELECT * FROM arrays, UNNEST(arrayLongNulls) as ut(uln)) ,UNNEST(arrayDoubleNulls) as ut(udn)
|
||||
), UNNEST(arrayStringNulls) as ut(usn) WHERE arrayString = ARRAY['a','b'] AND uln = 1 AND udn = 2.2 AND usn = 'a';
|
||||
+-------------+-----+-----+-----+
|
||||
| arrayString | uln | udn | usn |
|
||||
+-------------+-----+-----+-----+
|
||||
+-------------+-----+-----+-----+
|
||||
(0 rows)
|
||||
|
||||
!ok
|
||||
LogicalProject(arrayString=[CAST(ARRAY('a':VARCHAR, 'b':VARCHAR)):VARCHAR ARRAY], uln=[CAST(1:BIGINT):BIGINT], udn=[$1], usn=[$2])
|
||||
LogicalUnnest(unnestExpr=[$0], filter=[=($0, 'a')])
|
||||
LogicalProject(arrayStringNulls=[$0], udn=[$2])
|
||||
LogicalUnnest(unnestExpr=[$1], filter=[=($0, 2.2)])
|
||||
LogicalProject(arrayStringNulls=[$0], arrayDoubleNulls=[$2])
|
||||
LogicalUnnest(unnestExpr=[$1], filter=[=($0, 1)])
|
||||
LogicalProject(arrayStringNulls=[$2], arrayLongNulls=[$4], arrayDoubleNulls=[$6])
|
||||
LogicalFilter(condition=[=($1, CAST(ARRAY('a', 'b')):VARCHAR ARRAY NOT NULL)])
|
||||
LogicalTableScan(table=[[druid, arrays]])
|
||||
|
||||
!logicalPlan
|
||||
DruidProject(arrayString=[CAST(ARRAY('a':VARCHAR, 'b':VARCHAR)):VARCHAR ARRAY], uln=[CAST(1:BIGINT):BIGINT], udn=[$1], usn=[$2], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[$0], filter=[=($0, 'a')])
|
||||
DruidProject(arrayStringNulls=[$0], udn=[$2], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[$1], filter=[=($0, 2.2)])
|
||||
DruidProject(arrayStringNulls=[$0], arrayDoubleNulls=[$2], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[$1], filter=[=($0, 1)])
|
||||
DruidProject(arrayStringNulls=[$2], arrayLongNulls=[$4], arrayDoubleNulls=[$6], druid=[logical])
|
||||
DruidFilter(condition=[=($1, CAST(ARRAY('a', 'b')):VARCHAR ARRAY NOT NULL)])
|
||||
DruidTableScan(table=[[druid, arrays]], druid=[logical])
|
||||
|
||||
!druidPlan
|
||||
{
|
||||
"queryType" : "scan",
|
||||
"dataSource" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "filter",
|
||||
"base" : {
|
||||
"type" : "table",
|
||||
"name" : "arrays"
|
||||
},
|
||||
"filter" : {
|
||||
"type" : "equals",
|
||||
"column" : "arrayString",
|
||||
"matchValueType" : "ARRAY<STRING>",
|
||||
"matchValue" : [ "a", "b" ]
|
||||
}
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "\"arrayLongNulls\"",
|
||||
"outputType" : "ARRAY<LONG>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "LONG",
|
||||
"matchValue" : 1
|
||||
}
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "\"arrayDoubleNulls\"",
|
||||
"outputType" : "ARRAY<DOUBLE>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "DOUBLE",
|
||||
"matchValue" : 2.2
|
||||
}
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "_j0.unnest",
|
||||
"expression" : "\"arrayStringNulls\"",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "_j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "a"
|
||||
}
|
||||
},
|
||||
"intervals" : {
|
||||
"type" : "intervals",
|
||||
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
|
||||
},
|
||||
"virtualColumns" : [ {
|
||||
"type" : "expression",
|
||||
"name" : "v0",
|
||||
"expression" : "array('a','b')",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
}, {
|
||||
"type" : "expression",
|
||||
"name" : "v1",
|
||||
"expression" : "1",
|
||||
"outputType" : "LONG"
|
||||
} ],
|
||||
"resultFormat" : "compactedList",
|
||||
"columns" : [ "v0", "v1", "j0.unnest", "_j0.unnest" ],
|
||||
"columnTypes" : [ "ARRAY<STRING>", "LONG", "DOUBLE", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
@ -0,0 +1,134 @@
|
||||
# testUnnestThriceWithFiltersOnDimAndUnnestColumnsORCombinations@NullHandling=sql case-crc:b18b7dbe
|
||||
# quidem testcase reason: IMPROVED_PLAN
|
||||
!set debug true
|
||||
!set defaultTimeout 300000
|
||||
!set maxScatterGatherBytes 9223372036854775807
|
||||
!set plannerStrategy DECOUPLED
|
||||
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
|
||||
!set sqlQueryId dummy
|
||||
!set sqlStringifyArrays false
|
||||
!set outputformat mysql
|
||||
!use druidtest:///
|
||||
SELECT dimZipf, dim3_unnest1, dim3_unnest2, dim3_unnest3 FROM
|
||||
( SELECT * FROM
|
||||
( SELECT * FROM lotsocolumns, UNNEST(MV_TO_ARRAY(dimMultivalEnumerated)) as ut(dim3_unnest1) ) ,UNNEST(MV_TO_ARRAY(dimMultivalEnumerated)) as ut(dim3_unnest2)
|
||||
), UNNEST(MV_TO_ARRAY(dimMultivalEnumerated)) as ut(dim3_unnest3) WHERE dimZipf=27 AND (dim3_unnest1='Baz' OR dim3_unnest2='Hello') AND dim3_unnest3='World';
|
||||
+---------+--------------+--------------+--------------+
|
||||
| dimZipf | dim3_unnest1 | dim3_unnest2 | dim3_unnest3 |
|
||||
+---------+--------------+--------------+--------------+
|
||||
| 27 | Baz | Baz | World |
|
||||
| 27 | Baz | Baz | World |
|
||||
| 27 | Baz | Baz | World |
|
||||
| 27 | Baz | Baz | World |
|
||||
| 27 | Baz | Hello | World |
|
||||
| 27 | Baz | Hello | World |
|
||||
| 27 | Baz | World | World |
|
||||
| 27 | Baz | World | World |
|
||||
| 27 | Hello | Hello | World |
|
||||
| 27 | World | Hello | World |
|
||||
+---------+--------------+--------------+--------------+
|
||||
(10 rows)
|
||||
|
||||
!ok
|
||||
LogicalProject(dimZipf=[$0], dim3_unnest1=[$1], dim3_unnest2=[$2], dim3_unnest3=[$4])
|
||||
LogicalUnnest(unnestExpr=[MV_TO_ARRAY($3)], filter=[=($0, 'World')])
|
||||
LogicalProject(dimZipf=[$1], dim3_unnest1=[$2], EXPR$0=[$3], dimMultivalEnumerated0=[$0])
|
||||
LogicalFilter(condition=[OR(=($2, 'Baz'), =($3, 'Hello'))])
|
||||
LogicalUnnest(unnestExpr=[MV_TO_ARRAY($0)])
|
||||
LogicalUnnest(unnestExpr=[MV_TO_ARRAY($0)])
|
||||
LogicalProject(dimMultivalEnumerated=[$2], dimZipf=[$8])
|
||||
LogicalFilter(condition=[=(CAST($8):INTEGER, 27)])
|
||||
LogicalTableScan(table=[[druid, lotsocolumns]])
|
||||
|
||||
!logicalPlan
|
||||
DruidProject(dimZipf=[$0], dim3_unnest1=[$1], dim3_unnest2=[$2], dim3_unnest3=[$4], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[MV_TO_ARRAY($3)], filter=[=($0, 'World')])
|
||||
DruidProject(dimZipf=[$1], dim3_unnest1=[$2], EXPR$0=[$3], dimMultivalEnumerated0=[$0], druid=[logical])
|
||||
DruidFilter(condition=[OR(=($2, 'Baz'), =($3, 'Hello'))])
|
||||
DruidUnnest(unnestExpr=[MV_TO_ARRAY($0)])
|
||||
DruidUnnest(unnestExpr=[MV_TO_ARRAY($0)])
|
||||
DruidProject(dimMultivalEnumerated=[$2], dimZipf=[$8], druid=[logical])
|
||||
DruidFilter(condition=[=(CAST($8):INTEGER, 27)])
|
||||
DruidTableScan(table=[[druid, lotsocolumns]], druid=[logical])
|
||||
|
||||
!druidPlan
|
||||
{
|
||||
"queryType" : "scan",
|
||||
"dataSource" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "filter",
|
||||
"base" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "filter",
|
||||
"base" : {
|
||||
"type" : "table",
|
||||
"name" : "lotsocolumns"
|
||||
},
|
||||
"filter" : {
|
||||
"type" : "equals",
|
||||
"column" : "dimZipf",
|
||||
"matchValueType" : "LONG",
|
||||
"matchValue" : 27
|
||||
}
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "mv_to_array(\"dimMultivalEnumerated\")",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : null
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "_j0.unnest",
|
||||
"expression" : "mv_to_array(\"dimMultivalEnumerated\")",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : null
|
||||
},
|
||||
"filter" : {
|
||||
"type" : "or",
|
||||
"fields" : [ {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "Baz"
|
||||
}, {
|
||||
"type" : "equals",
|
||||
"column" : "_j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "Hello"
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "__j0.unnest",
|
||||
"expression" : "mv_to_array(\"dimMultivalEnumerated\")",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "__j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "World"
|
||||
}
|
||||
},
|
||||
"intervals" : {
|
||||
"type" : "intervals",
|
||||
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
|
||||
},
|
||||
"resultFormat" : "compactedList",
|
||||
"columns" : [ "dimZipf", "j0.unnest", "_j0.unnest", "__j0.unnest" ],
|
||||
"columnTypes" : [ "STRING", "STRING", "STRING", "STRING" ],
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
},
|
||||
"legacy" : false
|
||||
}
|
||||
!nativePlan
|
@ -0,0 +1,77 @@
|
||||
# testUnnestWithGroupByHavingSelector case-crc:76a4f833
|
||||
# quidem testcase reason: IMPROVED_PLAN
|
||||
!set debug true
|
||||
!set defaultTimeout 300000
|
||||
!set maxScatterGatherBytes 9223372036854775807
|
||||
!set plannerStrategy DECOUPLED
|
||||
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
|
||||
!set sqlQueryId dummy
|
||||
!set sqlStringifyArrays false
|
||||
!set outputformat mysql
|
||||
!use druidtest:///
|
||||
SELECT d3, COUNT(*) FROM druid.numfoo, UNNEST(MV_TO_ARRAY(dim3)) AS unnested(d3) GROUP BY d3 HAVING d3='b';
|
||||
+----+--------+
|
||||
| d3 | EXPR$1 |
|
||||
+----+--------+
|
||||
| b | 2 |
|
||||
+----+--------+
|
||||
(1 row)
|
||||
|
||||
!ok
|
||||
LogicalAggregate(group=[{0}], EXPR$1=[COUNT()])
|
||||
LogicalProject(EXPR$0=[$2])
|
||||
LogicalUnnest(unnestExpr=[MV_TO_ARRAY($1)], filter=[=($0, 'b')])
|
||||
LogicalProject(__time=[$0], dim3=[$3])
|
||||
LogicalTableScan(table=[[druid, numfoo]])
|
||||
|
||||
!logicalPlan
|
||||
DruidAggregate(group=[{0}], EXPR$1=[COUNT()], druid=[logical])
|
||||
DruidProject(EXPR$0=[$2], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[MV_TO_ARRAY($1)], filter=[=($0, 'b')])
|
||||
DruidProject(__time=[$0], dim3=[$3], druid=[logical])
|
||||
DruidTableScan(table=[[druid, numfoo]], druid=[logical])
|
||||
|
||||
!druidPlan
|
||||
{
|
||||
"queryType" : "groupBy",
|
||||
"dataSource" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "table",
|
||||
"name" : "numfoo"
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "mv_to_array(\"dim3\")",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "b"
|
||||
}
|
||||
},
|
||||
"intervals" : {
|
||||
"type" : "intervals",
|
||||
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
|
||||
},
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
},
|
||||
"dimensions" : [ {
|
||||
"type" : "default",
|
||||
"dimension" : "j0.unnest",
|
||||
"outputName" : "d0",
|
||||
"outputType" : "STRING"
|
||||
} ],
|
||||
"aggregations" : [ {
|
||||
"type" : "count",
|
||||
"name" : "a0"
|
||||
} ],
|
||||
"limitSpec" : {
|
||||
"type" : "NoopLimitSpec"
|
||||
}
|
||||
}
|
||||
!nativePlan
|
@ -0,0 +1,75 @@
|
||||
# testUnnestWithGroupByHavingWithWhereOnUnnestArrayCol@NullHandling=sql case-crc:33b6333c
|
||||
# quidem testcase reason: IMPROVED_PLAN
|
||||
!set debug true
|
||||
!set defaultTimeout 300000
|
||||
!set maxScatterGatherBytes 9223372036854775807
|
||||
!set plannerStrategy DECOUPLED
|
||||
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
|
||||
!set sqlQueryId dummy
|
||||
!set sqlStringifyArrays false
|
||||
!set outputformat mysql
|
||||
!use druidtest:///
|
||||
SELECT uln, COUNT(*) FROM druid.arrays, UNNEST(arrayLongNulls) AS unnested(uln) WHERE uln IN (1, 2, 3) GROUP BY uln HAVING uln=1;
|
||||
+-----+--------+
|
||||
| uln | EXPR$1 |
|
||||
+-----+--------+
|
||||
| 1 | 5 |
|
||||
+-----+--------+
|
||||
(1 row)
|
||||
|
||||
!ok
|
||||
LogicalAggregate(group=[{1}], EXPR$1=[COUNT()])
|
||||
LogicalUnnest(unnestExpr=[$0], filter=[=($0, 1)])
|
||||
LogicalProject(arrayLongNulls=[$4])
|
||||
LogicalTableScan(table=[[druid, arrays]])
|
||||
|
||||
!logicalPlan
|
||||
DruidAggregate(group=[{1}], EXPR$1=[COUNT()], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[$0], filter=[=($0, 1)])
|
||||
DruidProject(arrayLongNulls=[$4], druid=[logical])
|
||||
DruidTableScan(table=[[druid, arrays]], druid=[logical])
|
||||
|
||||
!druidPlan
|
||||
{
|
||||
"queryType" : "groupBy",
|
||||
"dataSource" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "table",
|
||||
"name" : "arrays"
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "\"arrayLongNulls\"",
|
||||
"outputType" : "ARRAY<LONG>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "LONG",
|
||||
"matchValue" : 1
|
||||
}
|
||||
},
|
||||
"intervals" : {
|
||||
"type" : "intervals",
|
||||
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
|
||||
},
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
},
|
||||
"dimensions" : [ {
|
||||
"type" : "default",
|
||||
"dimension" : "j0.unnest",
|
||||
"outputName" : "d0",
|
||||
"outputType" : "LONG"
|
||||
} ],
|
||||
"aggregations" : [ {
|
||||
"type" : "count",
|
||||
"name" : "a0"
|
||||
} ],
|
||||
"limitSpec" : {
|
||||
"type" : "NoopLimitSpec"
|
||||
}
|
||||
}
|
||||
!nativePlan
|
@ -0,0 +1,77 @@
|
||||
# testUnnestWithGroupByHavingWithWhereOnUnnestCol@NullHandling=sql case-crc:a97b58b2
|
||||
# quidem testcase reason: IMPROVED_PLAN
|
||||
!set debug true
|
||||
!set defaultTimeout 300000
|
||||
!set maxScatterGatherBytes 9223372036854775807
|
||||
!set plannerStrategy DECOUPLED
|
||||
!set sqlCurrentTimestamp 2000-01-01T00:00:00Z
|
||||
!set sqlQueryId dummy
|
||||
!set sqlStringifyArrays false
|
||||
!set outputformat mysql
|
||||
!use druidtest:///
|
||||
SELECT d3, COUNT(*) FROM druid.numfoo, UNNEST(MV_TO_ARRAY(dim3)) AS unnested(d3) WHERE d3 IN ('a','c') GROUP BY d3 HAVING d3='a';
|
||||
+----+--------+
|
||||
| d3 | EXPR$1 |
|
||||
+----+--------+
|
||||
| a | 1 |
|
||||
+----+--------+
|
||||
(1 row)
|
||||
|
||||
!ok
|
||||
LogicalAggregate(group=[{0}], EXPR$1=[COUNT()])
|
||||
LogicalProject(EXPR$0=[$2])
|
||||
LogicalUnnest(unnestExpr=[MV_TO_ARRAY($1)], filter=[=($0, 'a')])
|
||||
LogicalProject(__time=[$0], dim3=[$3])
|
||||
LogicalTableScan(table=[[druid, numfoo]])
|
||||
|
||||
!logicalPlan
|
||||
DruidAggregate(group=[{0}], EXPR$1=[COUNT()], druid=[logical])
|
||||
DruidProject(EXPR$0=[$2], druid=[logical])
|
||||
DruidUnnest(unnestExpr=[MV_TO_ARRAY($1)], filter=[=($0, 'a')])
|
||||
DruidProject(__time=[$0], dim3=[$3], druid=[logical])
|
||||
DruidTableScan(table=[[druid, numfoo]], druid=[logical])
|
||||
|
||||
!druidPlan
|
||||
{
|
||||
"queryType" : "groupBy",
|
||||
"dataSource" : {
|
||||
"type" : "unnest",
|
||||
"base" : {
|
||||
"type" : "table",
|
||||
"name" : "numfoo"
|
||||
},
|
||||
"virtualColumn" : {
|
||||
"type" : "expression",
|
||||
"name" : "j0.unnest",
|
||||
"expression" : "mv_to_array(\"dim3\")",
|
||||
"outputType" : "ARRAY<STRING>"
|
||||
},
|
||||
"unnestFilter" : {
|
||||
"type" : "equals",
|
||||
"column" : "j0.unnest",
|
||||
"matchValueType" : "STRING",
|
||||
"matchValue" : "a"
|
||||
}
|
||||
},
|
||||
"intervals" : {
|
||||
"type" : "intervals",
|
||||
"intervals" : [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ]
|
||||
},
|
||||
"granularity" : {
|
||||
"type" : "all"
|
||||
},
|
||||
"dimensions" : [ {
|
||||
"type" : "default",
|
||||
"dimension" : "j0.unnest",
|
||||
"outputName" : "d0",
|
||||
"outputType" : "STRING"
|
||||
} ],
|
||||
"aggregations" : [ {
|
||||
"type" : "count",
|
||||
"name" : "a0"
|
||||
} ],
|
||||
"limitSpec" : {
|
||||
"type" : "NoopLimitSpec"
|
||||
}
|
||||
}
|
||||
!nativePlan
|
Loading…
x
Reference in New Issue
Block a user