KazydubB commented on a change in pull request #1870: DRILL-7359: Add support for DICT type in RowSet Framework URL: https://github.com/apache/drill/pull/1870#discussion_r361603427
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/physical/resultSet/impl/ColumnBuilder.java ########## @@ -179,6 +189,19 @@ private ColumnState buildPrimitive(ContainerState parent, ColumnReadProjection c vectorState); } + /** + * Check if this is a special case when vector, writer and column state should be + * created for a primitive field though the field itself is not projected. This is + * needed because {@code DICT}'s {@code keys} field is not projected but is needed + * to be initialized to ensure the dict vector is constructed properly. Review comment: Oops, my bad - hasn't mentioned (just a kind of implicit hint in the `@return`) in the javadoc body (do not know what is the text before `@param`, `@return` etc. is called) that this affects creation of `DICT`'s `key` when `value` is accessed by key only, i.e. `col['someKey']` with `col` being a `DICT` column with `String` (`VARCHAR`) `key`; `value` in this case will be projected. If the `DICT` is not projected, this won't create any vector: neither `DictVector` nor vector for `key` (or `value`) - special "dummy" vector for `DICT` will be used, as is done for other vectors. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services