[
https://issues.apache.org/jira/browse/DRILL-7359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16964061#comment-16964061
]
ASF GitHub Bot commented on DRILL-7359:
---------------------------------------
KazydubB commented on issue #1870: DRILL-7359: Add support for DICT type in
RowSet Framework
URL: https://github.com/apache/drill/pull/1870#issuecomment-548392780
@paul-rogers thank you for review. I've made some changes, please take a
look.
There is a (interface) `DictWriter` similar to what you proposed with the
exception it `extends` `ArrayWriter`, i.e. when writing a `dict` is assumed to
be an array of tuples (with `key` and `value` fields) other than a pair of
arrays. (`DictWriter`'s implementation, `ObjectDictWriter`, actually `extends
ObjectArrayWriter`).
For reading, there is a (interface) `DictReader` (`extends ColumnReader`)
introduces 5 new methods:
```
ObjectReader getValueReader(Object key);
Object get(Object key);
int size();
ValueType keyColumnType();
ObjectType valueColumnType();
```
For key/value lookup `getValueReader(Object key)` is used. When a `key` is
found, `value`'s reader is returned with its position set correspondingly to
the `key`. In a case there is no such `key` - a special type of `ObjectReader`
- `org.apache.drill.exec.vector.accessor.reader.NullReader` will be returned.
I am not sure that array access is needed - can't see any use case yet.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add support for DICT type in RowSet Framework
> ---------------------------------------------
>
> Key: DRILL-7359
> URL: https://issues.apache.org/jira/browse/DRILL-7359
> Project: Apache Drill
> Issue Type: New Feature
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
> Fix For: 1.17.0
>
>
> Add support for new DICT data type (see DRILL-7096) in RowSet Framework
--
This message was sent by Atlassian Jira
(v8.3.4#803005)