Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.16.0
-
None
Description
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"]}
Attachments
Issue Links
- relates to
-
HIVE-19044 Duplicate field names within Druid Query Generated by Calcite plan
-
- Patch Available
-
- links to