drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Dunning (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3444) Implement Is Not Null/Is Null on List of objects - [isnotnull(MAP-REPEATED)] error
Date Wed, 01 Jul 2015 21:52:06 GMT

    [ https://issues.apache.org/jira/browse/DRILL-3444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611048#comment-14611048
] 

Ted Dunning commented on DRILL-3444:
------------------------------------


I talked to Tug about this today and we walked through the code looking at how to fix this.

The key lack is a missing IsNull operator.  Tug started in trying to figure out how to write
such an operator.  Right now we have a bunch of template generated operators for all of the
specific scalar types and also the uniform list types.  What we don't have is a null operator
for general lists.

Can somebody point at how such an operator ought to be implemented?  



> Implement Is Not Null/Is Null on List of objects -  [isnotnull(MAP-REPEATED)] error
> -----------------------------------------------------------------------------------
>
>                 Key: DRILL-3444
>                 URL: https://issues.apache.org/jira/browse/DRILL-3444
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Data Types, Functions - Drill
>         Environment: Drill 1.0
>            Reporter: Tugdual Grall
>            Assignee: Daniel Barclay (Drill)
>            Priority: Critical
>
> It is not possble to use the IS NULL / IS NOT NULL operator on an attribuite that contains
a list of "object". (it is working with a list of scalar types)
> Query:
> {code}
> select *
> from dfs.`/working/json_array/*.json` p
> where p.tags IS NOT NULL
> {code}
> Document:
> {code}
> {
>   "name" : "PPRODUCT_002",
>   "price" : 200.00,
>   "tags" : [ { "type" : "sports" } , { "type" : "ocean" }]
> }
> {code}
> Error:
> {code}
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException:
Failure while trying to materialize incoming schema. Errors: Error in expression at index
-1. Error: Missing function implementation: [isnotnull(MAP-REPEATED)]. Full expression: --UNKNOWN
EXPRESSION--.. Fragment 0:0 [Error Id: 384e6b86-ce17-4eb9-b5eb-27870a341c90 on 192.168.99.13:31010]
> {code}
> Workaround:
> By using a sub element it is working, for example:
> {code}
> select *
> from dfs.`/Users/tgrall/working/json_array/*.json` p
> where p.tags.type IS NULL
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message