drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-65) Jackson error while instantiating "union" query
Date Thu, 23 May 2013 16:48:19 GMT

     [ https://issues.apache.org/jira/browse/DRILL-65?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Nadeau resolved DRILL-65.
---------------------------------

    Resolution: Fixed
      Assignee: Jacques Nadeau

Fixed in changeset 673a96d136165dfc242e598fd501f5dfba8c5edf
                
> Jackson error while instantiating "union" query
> -----------------------------------------------
>
>                 Key: DRILL-65
>                 URL: https://issues.apache.org/jira/browse/DRILL-65
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Jacques Nadeau
>
> A query using "union" gives an error while trying to convert a JSON node to an object.
Here is the query:
> {
>   "head" : {
>     "type" : "apache_drill_logical_plan",
>     "version" : 1,
>     "generator" : {
>       "type" : "manual",
>       "info" : "na"
>     }
>   },
>   "storage" : [ {
>     "type" : "queue",
>     "name" : "queue"
>   }, {
>     "type" : "classpath",
>     "name" : "donuts-json"
>   } ],
>   "query" : [ {
>     "op" : "scan",
>     "@id" : 1,
>     "memo" : "initial_scan",
>     "storageengine" : "donuts-json",
>     "selection" : {
>       "path" : "/employees.json",
>       "type" : "JSON"
>     },
>     "ref" : "_MAP"
>   }, {
>     "op" : "project",
>     "input" : 1,
>     "@id" : 2,
>     "projections" : [ {
>       "ref" : "output.deptId",
>       "expr" : "_MAP.deptId"
>     } ]
>   }, {
>     "op" : "scan",
>     "@id" : 3,
>     "memo" : "initial_scan",
>     "storageengine" : "donuts-json",
>     "selection" : {
>       "path" : "/departments.json",
>       "type" : "JSON"
>     },
>     "ref" : "_MAP"
>   }, {
>     "op" : "project",
>     "input" : 3,
>     "@id" : 4,
>     "projections" : [ {
>       "ref" : "output.deptId",
>       "expr" : "_MAP.deptId"
>     } ]
>   },  {
>     "op": "union",
>     "@id" : 5,
>     "distinct": true,
>     "inputs": [2, 4]
>   }, {
>     "op" : "store",
>     "input" : 5,
>     "@id" : 6,
>     "memo" : "output sink",
>     "target" : {
>       "number" : 0
>     },
>     "partition" : null,
>     "storageEngine" : "queue"
>   } ]
> }
> and here is the error stack:
> Exception in thread "main" java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException:
Conflicting property-based creators: already had [constructor for org.apache.drill.common.logical.data.Union,
annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
encountered [constructor for org.apache.drill.common.logical.data.Union, annotations: {interface
com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
> 	at org.apache.drill.common.logical.LogicalPlan.parse(LogicalPlan.java:141)
> 	at org.apache.drill.exec.ref.ReferenceInterpreter.main(ReferenceInterpreter.java:95)
> 	at org.apache.drill.jdbc.test.JdbcTest.main(JdbcTest.java:93)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: com.fasterxml.jackson.databind.JsonMappingException: Conflicting property-based
creators: already had [constructor for org.apache.drill.common.logical.data.Union, annotations:
{interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
encountered [constructor for org.apache.drill.common.logical.data.Union, annotations: {interface
com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:269)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:143)
> 	at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:325)
> 	at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:170)
> 	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:98)
> 	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:82)
> 	at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:107)
> 	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:228)
> 	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:203)
> 	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:23)
> 	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:375)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:559)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObjectUsingNonDefault(BeanDeserializer.java:393)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:289)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
> 	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796)
> 	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
> 	at org.apache.drill.common.logical.LogicalPlan.parse(LogicalPlan.java:137)
> 	... 7 more
> Caused by: java.lang.IllegalArgumentException: Conflicting property-based creators: already
had [constructor for org.apache.drill.common.logical.data.Union, annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}],
encountered [constructor for org.apache.drill.common.logical.data.Union, annotations: {interface
com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator()}]
> 	at com.fasterxml.jackson.databind.deser.impl.CreatorCollector.verifyNonDup(CreatorCollector.java:205)
> 	at com.fasterxml.jackson.databind.deser.impl.CreatorCollector.addPropertyCreator(CreatorCollector.java:151)
> 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._handleSingleArgumentConstructor(BasicDeserializerFactory.java:492)
> 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._addDeserializerConstructors(BasicDeserializerFactory.java:428)
> 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory._constructDefaultValueInstantiator(BasicDeserializerFactory.java:363)
> 	at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:314)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:263)
> 	at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:171)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:388)
> 	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
> 	... 25 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message