[
https://issues.apache.org/jira/browse/DRILL-6810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660507#comment-16660507
]
ASF GitHub Bot commented on DRILL-6810:
---------------------------------------
arina-ielchiieva 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_r227337409
##########
File path:
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestParseFunctions.java
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.fn.impl;
+
+import org.apache.drill.categories.SqlFunctionTest;
+import org.apache.drill.test.ClusterFixture;
+import org.apache.drill.test.ClusterFixtureBuilder;
+import org.apache.drill.test.ClusterTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+
+import static org.apache.drill.test.TestBuilder.mapOf;
+
+@Category(SqlFunctionTest.class)
+public class TestParseFunctions extends ClusterTest {
+
+ @BeforeClass
+ public static void setup() throws Exception {
+ generateDataSource();
+ ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher);
+ startCluster(builder);
+ }
+
+ private static void generateDataSource() throws Exception {
+ try (BufferedWriter writer = new BufferedWriter(new FileWriter(
+ new File(dirTestWatcher.getRootDir(), "nullable_urls.json")))) {
+ String[] urls =
{"\"ftp://somewhere.com:3190/someFile?a=12&b=someValue\"", null,
"\"http://someUrl?p1=v1&p2=v=2&\""};
Review comment:
Please add file content in the comment.
----------------------------------------------------------------
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]
> Disable NULL_IF_NULL NullHandling for functions with ComplexWriter
> ------------------------------------------------------------------
>
> Key: DRILL-6810
> URL: https://issues.apache.org/jira/browse/DRILL-6810
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.14.0
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
> Fix For: 1.15.0
>
>
> Currently NullHandling.NULL_IF_NULL is allowed for UDFs with @Output of type
> org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter but no
> null handling is performed for the kind of functions which leads to
> confusion. The problem is ComplexWriter holds list/map values and Drill does
> not yet support NULL values for the types (there is an issue to allow null
> maps/lists in [DRILL-4824|https://issues.apache.org/jira/browse/DRILL-4824]).
> For such functions support for NULL_IF_NULL will be disabled, as it is done
> for aggregate functions, and NullHandling.INTERNAL should be used instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)