Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Improve end-to-end handling of STRUCT, MAP, ARRAY and MULTISET types.
Add annotations org.apache.calcite.adapter.java.Array and org.apache.calcite.adapter.java.Map to declare that a member of a class (i.e. a column) is of ARRAY or MAP type, and what the element/key/value types are.
Add metadata so that Avatica JDBC knows that when you have gone into an ARRAY column you are looking at a record type of say (INTEGER, ARRAY DOUBLE). Currently the metadata only goes one level down and after that you are looking at objects.
When an array or multiset is read, we need to know how it is internally represented. Currently it could be of type CUSTOM (e.g. a bean class such as Employee) or LIST or ARRAY. In this change we standardize on LIST. Thus when EnumerableUncollect comes to generate code for
select * from unnest(select employees from dept)
it will know that employees is a list and each employee record is also a list.
To do this we will need to convert (e.g. from an array of Employee objects) on the way in.
Attachments
Issue Links
- is related to
-
CALCITE-932 Fix muddled columns when RelFieldTrimmer is applied to Aggregate
- Closed