You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mykhailo Surnyk (Jira)" <ji...@apache.org> on 2020/12/10 16:29:00 UTC
[jira] [Created] (DRILL-7818) SplitPart (SPLIT_PART) UDF work
correct only with one-row data
Mykhailo Surnyk created DRILL-7818:
--------------------------------------
Summary: SplitPart (SPLIT_PART) UDF work correct only with one-row data
Key: DRILL-7818
URL: https://issues.apache.org/jira/browse/DRILL-7818
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Affects Versions: 1.18.0
Reporter: Mykhailo Surnyk
Fix For: 1.18.0
SPLIT_PART UDF from [https://github.com/apache/drill/blob/eb63eadda9a7836d70513e10caec4664c42a1237/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java#L389]
Don't work for the query that returns two or more rows, for example:
SELECT SPLIT_PART(A, ' ', 1) FROM (SELECT 'key1 value1' as A UNION SELECT 'key2 value2'
will throw an error, but
SELECT SPLIT_PART(A, ' ', 1) FROM (SELECT 'key1 value1' as A UNION SELECT 'key2 value2') limit 1
Will return the correct result.
It's reproducing also for real data without `union`, I add it's just for example.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)