-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.16.0
-
Fix Version/s: 1.17.0
-
Component/s: druid-adapter
-
Labels:None
This issue occurs if two projects layers use the same fields name, it will lead to a Druid query with a duplicated field names.
I can not reproduce this in Calcite but it is reproducible in Hive (it has to deal on how different layers of project are getting names)
Here is an example of faulty query where "$f4" is used twice.
{"queryType":"groupBy","dataSource":"druid_tableau.calcs","granularity":"all","dimensions":[{"type":"default","dimension":"key","outputName":"key","outputType":"STRING"}],"limitSpec":{"type":"default"},"aggregations":[{"type":"doubleSum","name":"$f1","fieldName":"num0"},{"type":"filtered","filter":{"type":"not","field":{"type":"selector","dimension":"num0","value":null}},"aggregator":{"type":"count","name":"$f2","fieldName":"num0"}},{"type":"doubleSum","name":"$f3","expression":"(\"num0\" * \"num0\")"},{"type":"doubleSum","name":"$f4","expression":"(\"num0\" * \"num0\")"}],"postAggregations":[{"type":"expression","name":"$f4","expression":"pow(((\"$f4\" - ((\"$f1\" * \"$f1\") / \"$f2\")) / \"$f2\"),0.5)"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
- relates to
-
HIVE-19044 Duplicate field names within Druid Query Generated by Calcite plan
-
- Patch Available
-
- links to