Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
1. RelStructuredTypeFlattener doesn't support aggregate functions for struct type column.
Example test case:
@Test public void testAggregateFunctionWithStructInput() { final String sql = "select count(dn.skill) from sales.dept_nested dn"; sql(sql).ok(); }
2. For other functions, except ITEM, flattener uses first nested primitive field from
original struct input. Example test case:
@Test public void testFunctionWithStructInput() { final String sql = "select json_type(dn.skill) from sales.dept_nested dn"; sql(sql).ok(); }
Generated plan:
LogicalProject(EXPR$0=[JSON_TYPE($2.TYPE)]) LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])
Attachments
Issue Links
- blocks
-
DRILL-7386 Fix count and typeOf functions for struct type
- Resolved
- links to