[
https://issues.apache.org/jira/browse/DRILL-6962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16740175#comment-16740175
]
benj edited comment on DRILL-6962 at 1/11/19 8:54 AM:
------------------------------------------------------
In 1.15.0 it's not exactly the same error message but the same idea :
{code:java}
SELECT coalesce(unknown1,unknown2) FROM myhdfs.test.`2018_pqt`;
java.lang.IndexOutOfBoundsException: index (0) must be less than size (0)
at
org.apache.drill.shaded.guava.com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:1196)
{code}
or
{code:java}
SELECT coalesce(null, null);
Error: VALIDATION ERROR: From line 1, column 8 to line 1, column 27: ELSE
clause or at least one THEN clause must be non-NULL
{code}
was (Author: benj641):
In 1.15.0 it's not exactly the same error message but the same idea :
{code:java}
SELECT coalesce(fsize3,fsize4) FROM myhdfs.test.`2018_pqt`;
java.lang.IndexOutOfBoundsException: index (0) must be less than size (0)
at
org.apache.drill.shaded.guava.com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:1196)
{code}
or
{code:java}
SELECT coalesce(null, null);
Error: VALIDATION ERROR: From line 1, column 8 to line 1, column 27: ELSE
clause or at least one THEN clause must be non-NULL
{code}
> Function coalesce returns an Error when none of the columns in coalesce exist
> in a parquet file
> -----------------------------------------------------------------------------------------------
>
> Key: DRILL-6962
> URL: https://issues.apache.org/jira/browse/DRILL-6962
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.13.0
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
>
> As Drill is schema-free, COALESCE function is expected to return a result and
> not error out even if none of the columns being referred to exists in files
> being queried.
> Here is an example for 2 columns, `unk_col` and `unk_col2`, which do not
> exist in the parquet files
> {code:java}
> select coalesce(unk_col, unk_col2) from dfs.`/tmp/parquetfiles`;
> Error: SYSTEM ERROR: CompileException: Line 56, Column 27: Assignment
> conversion not possible from type
> “org.apache.drill.exec.expr.holders.NullableIntHolder” to type
> “org.apache.drill.exec.vector.UntypedNullHolder”
> Fragment 1:0
> [Error Id: 7b9193fb-289b-4fbf-a52a-2b93b01f0cd0 on dkvm2c:31010]
> (state=,code=0)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)