KazydubB commented on a change in pull request #1854: DRILL-7373: Fix problems
involving reading from DICT type
URL: https://github.com/apache/drill/pull/1854#discussion_r324549150
##########
File path: exec/vector/src/main/codegen/templates/BaseReader.java
##########
@@ -83,6 +83,20 @@
*/
int find(int key);
+ /**
+ * Obtain the index for given key in current row used to find a
corresponding value with.
+ * Used in generated code when retrieving value from Dict using {@link
org.apache.drill.common.expression.PathSegment}
+ * with provided {@link
org.apache.drill.common.expression.PathSegment#getOriginalValue()}
+ * in cases when {@link
org.apache.drill.exec.vector.complex.DictVector#getValueType()} is complex.
+ *
+ * <p>The {@code key} is assumed to be of actual type, is not converted
and used as is.
+ *
+ * @param key key value
+ * @return index for the given key
+ * @see org.apache.drill.exec.vector.complex.DictVector
+ */
+ int find(Object key);
Review comment:
Yes, other methods are still used when there is no notion of column types
during validation phase (when querying `DynamicDrillTable`, for example) based
on `PathSegment` info (`int` for `ArraySegment` and `String` for
`NamedSegment`).
----------------------------------------------------------------
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]
With regards,
Apache Git Services