drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Gilmore (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3150) Error when filtering non-existent field with a string
Date Wed, 20 May 2015 02:04:01 GMT
Adam Gilmore created DRILL-3150:

             Summary: Error when filtering non-existent field with a string
                 Key: DRILL-3150
                 URL: https://issues.apache.org/jira/browse/DRILL-3150
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Codegen
    Affects Versions: 1.0.0
            Reporter: Adam Gilmore
            Assignee: Chris Westin
            Priority: Critical

The following query throws an exception:

select count(*) from cp.`employee.json` where `blah` = 'test'

"blah" does not exist as a field in the JSON.  The expected behaviour would be to filter out
all rows as that field is not present (thus cannot equal the string 'test').

Instead, the following exception occurs:

org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: test

Fragment 0:0

[Error Id: 5d6c9a82-8f87-41b2-a496-67b360302b76 on ip-10-1-50-208.ec2.internal:31010]

Apart from the fact the real error message is hidden, the issue is that we're trying to cast
the varchar to int ('test' to an int).  This seems to be because the projection out of the
scan when a field is not found becomes INT:OPTIONAL.

The filter should not fail on this - if the varchar fails to convert to an int, the filter
should just simply not allow any records through.

This message was sent by Atlassian JIRA

View raw message