You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Hanifi Gunes (JIRA)" <ji...@apache.org> on 2015/01/15 01:51:35 UTC

[jira] [Commented] (DRILL-1796) display a map as value caused ExecutionSetupException

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

Hanifi Gunes commented on DRILL-1796:
-------------------------------------

Unable to re-prod this @69db15e

Take data file:
{code}
{"fields": {"map":[{"key":"ho_wf2gp","value":{"member2":0}}]}}
{"fields": {"map":[{"key":"ho_wf2gp","value":{"member2":0}}]}}
{code}

Running the queries above reports the same result. Can you try again and attach the original data file if the problem persists?

> display a map as value caused ExecutionSetupException
> -----------------------------------------------------
>
>                 Key: DRILL-1796
>                 URL: https://issues.apache.org/jira/browse/DRILL-1796
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>            Reporter: Chun Chang
>            Assignee: Hanifi Gunes
>             Fix For: 0.8.0
>
>
> #Mon Dec 01 11:15:02 PST 2014
> git.commit.id.abbrev=a60e1db
> Have a parquet data contains the following:
> 0: jdbc:drill:schema=dfs.drillTestDir> select t.fields.map[0] from `data.parquet` as t limit 2;
> +------------+
> |   EXPR$0   |
> +------------+
> | {"key":"ho_wf2gp","value":{"member2":0}} |
> | {"key":"ho_wf2gp","value":{"member2":0}} |
> +------------+
> The following query displaying 'key' works:
> 0: jdbc:drill:schema=dfs.drillTestDir> select t.fields.map[0].`key` from `data.parquet` as t limit 2;
> +------------+
> |   EXPR$0   |
> +------------+
> | ho_wf2gp   |
> | ho_wf2gp   |
> +------------+
> But if the field to display is a map, then I get the exception:
> 0: jdbc:drill:schema=dfs.drillTestDir> select t.fields.map[0].`value` from `data.parquet` as t limit 2;
> Query failed: Query failed: Failure while running fragment., You tried to write a VarChar type when you are using a ValueWriter of type NullableVarCharWriterImpl. [ 5494307b-7c11-421e-be49-d0bf043a4ee1 on qa-node120.qa.lab:31010 ]
> [ 5494307b-7c11-421e-be49-d0bf043a4ee1 on qa-node120.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> Here is the stack:
> 12:23:09.249 [2b8331d1-db0c-1150-f58e-7884c00ea314:frag:0:0] WARN  o.a.d.e.w.fragment.FragmentExecutor - Error while initializing or executing fragment
> org.apache.drill.common.exceptions.ExecutionSetupException: java.lang.IllegalArgumentException: You tried to write a VarChar type when you are using a ValueWriter of type NullableVarCharWriterImpl.
> 	at org.apache.drill.exec.store.parquet2.DrillParquetReader.setup(DrillParquetReader.java:252) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ScanBatch.<init>(ScanBatch.java:97) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.ParquetScanBatchCreator.getBatch(ParquetScanBatchCreator.java:147) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.ParquetScanBatchCreator.getBatch(ParquetScanBatchCreator.java:53) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ImplCreator.visitOp(ImplCreator.java:62) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ImplCreator.visitOp(ImplCreator.java:39) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitSubScan(AbstractPhysicalVisitor.java:125) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.store.parquet.ParquetRowGroupScan.accept(ParquetRowGroupScan.java:107) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:74) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ImplCreator.visitOp(ImplCreator.java:62) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
> 	at org.apache.drill.exec.physical.impl.ImplCreator.visitOp(ImplCreator.java:39) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]



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