You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Tugdual Grall (JIRA)" <ji...@apache.org> on 2015/06/22 20:47:02 UTC

[jira] [Created] (DRILL-3334) "java.lang.IllegalStateException: Failure while reading vector.: raised when using dynamic schema in JSON

Tugdual Grall created DRILL-3334:
------------------------------------

             Summary:  "java.lang.IllegalStateException: Failure while reading vector.: raised when using dynamic schema in JSON
                 Key: DRILL-3334
                 URL: https://issues.apache.org/jira/browse/DRILL-3334
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Data Types
    Affects Versions: 1.0.0
         Environment: Single Node running on OSX
and
MapR Hadoop SandBox + Drill
            Reporter: Tugdual Grall
            Assignee: Daniel Barclay (Drill)


I have a simple data set based on 3 JSON documents:
 - 1 customer
 - 2 orders
(I have attached the document to the JIRA)

when I do the following query that is a join between order and customers I can raise some unexpected exception.

A working query:
{code}
SELECT customers.id, orders.total
FROM  dfs.ecommerce.`customers/*.json` customers,
     dfs.ecommerce.`orders/*.json` orders
WHERE customers.id = orders.cust_id
AND customers.country = 'FRANCE'
{code}

It works since orders.total is present in all orders

Now when I execute the following query (tax is not present in all document)
{code}
SELECT customers.id, orders.tax
FROM  dfs.ecommerce.`customers/*.json` customers,
     dfs.ecommerce.`orders/*.json` orders
WHERE customers.id = orders.cust_id
AND customers.country = 'FRANCE'
{code}

Thsi query raise the following exception:
{code}
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: java.lang.IllegalStateException: Failure while reading vector. Expected vector class of org.apache.drill.exec.vector.NullableIntVector but was holding vector class org.apache.drill.exec.vector.NullableBigIntVector. Fragment 0:0 [Error Id: a7ad300a-4446-41f3-8b1c-4bb7d1dbfb52 on maprdemo:31010]
{code}

If you cannot reproduce with tax, you can try with the field:
 orders.cool

or simply move the tax field from one document to the others.
(the field must be present in 1 document only)

It looks like Drill is losing the list of columns present globally.

Note: if I use a field that does not exist in any document it is working ( orders.this_is_crazy )

Note: if I use * instead of a projection this raise another exception:
{code}
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Hash join does not support schema changes Fragment 0:0 [Error Id: 0b20d580-37a3-491a-9987-4d04fb6f2d43 on maprdemo:31010]
{code}





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