You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/10/05 21:10:26 UTC
[jira] [Created] (CALCITE-910) Improve handling of ARRAY, MULTISET,
STRUCT types
Julian Hyde created CALCITE-910:
-----------------------------------
Summary: Improve handling of ARRAY, MULTISET, STRUCT types
Key: CALCITE-910
URL: https://issues.apache.org/jira/browse/CALCITE-910
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
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 {code}select * from unnest(select employees from dept){code} 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)