KazydubB commented on a change in pull request #1509: DRILL-6810: Disable
NULL_IF_NULL NullHandling for functions with Comp…
URL: https://github.com/apache/drill/pull/1509#discussion_r228601836
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java
##########
@@ -50,15 +50,18 @@
* scalar value fields
* value fields need to be of the same data type
*/
- @FunctionTemplate(names = {"mappify", "kvgen"}, scope =
FunctionTemplate.FunctionScope.SIMPLE, nulls =
FunctionTemplate.NullHandling.NULL_IF_NULL, isRandom = true)
+ @FunctionTemplate(names = {"mappify", "kvgen"}, scope =
FunctionTemplate.FunctionScope.SIMPLE, isRandom = true)
public static class ConvertMapToKeyValuePairs implements DrillSimpleFunc {
+
@Param FieldReader reader;
@Inject DrillBuf buffer;
@Output ComplexWriter writer;
+ @Override
public void setup() {
}
+ @Override
Review comment:
It looks like it can't be null. Checked on ```select mappify(foo) from
`mappify.json`;``` where `mappify.json` contains a single entry `{foo: null}`.
In this case `reader` is generated based on input's `ValueVector`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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