Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-671

ByteString does not deserialize properly as a FetchRequest parameterValue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      I think the reason here is that FetchRequest#parameterValues is declared as a List<Object>, which Jackson interprets as a request to serialize as plain objects (see Deserializing, other).

      1. 671.patch
        4 kB
        Nick Dimiduk

        Issue Links

          Activity

          Hide
          ndimiduk Nick Dimiduk added a comment -

          Here's a patch that includes a test to demonstrate the problem. Adding JsonTypeInfo and JsonCreator annotations don't appear to help (I'm doing it wrong?)

          Show
          ndimiduk Nick Dimiduk added a comment - Here's a patch that includes a test to demonstrate the problem. Adding JsonTypeInfo and JsonCreator annotations don't appear to help (I'm doing it wrong?)
          Hide
          julianhyde Julian Hyde added a comment -

          I don't think the Jackson type information can kick in if it's a list of Object, only if it's a list of C where C is a class that has a JsonTypeInfo annotation.

          I've been thinking that we shouldn't be sending just parameter values, but (type, value) pairs. The type will solve the problem of, say sending a long 0 and getting an int 0 at the other end (we'd instead send

          {type: "long", value: 0}

          ) and it will also give us an opportunity to create a sub-type for byte arrays.

          Show
          julianhyde Julian Hyde added a comment - I don't think the Jackson type information can kick in if it's a list of Object, only if it's a list of C where C is a class that has a JsonTypeInfo annotation. I've been thinking that we shouldn't be sending just parameter values, but (type, value) pairs. The type will solve the problem of, say sending a long 0 and getting an int 0 at the other end (we'd instead send {type: "long", value: 0} ) and it will also give us an opportunity to create a sub-type for byte arrays.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          (type, value) pairs makes sense? How to we represent them such that Jackson can automagically encode them correctly when "type erasure" is happening on Object references? In my case here, I'll still end up with a (AvaticaParameter<VARBINARY>,

          {"bytes", "blahblah"}

          ) instead of (AvaticaParameter<VARBINARY>, ByteString). Strongly typed container classes (or an enum) would do the trick, but that leads us into "all possible combinations of" territory. Maybe an AvaticaParameterValue class that's effectively a union of typed fields, only one of which has a value.

          Show
          ndimiduk Nick Dimiduk added a comment - (type, value) pairs makes sense? How to we represent them such that Jackson can automagically encode them correctly when "type erasure" is happening on Object references? In my case here, I'll still end up with a (AvaticaParameter<VARBINARY>, {"bytes", "blahblah"} ) instead of (AvaticaParameter<VARBINARY>, ByteString). Strongly typed container classes (or an enum) would do the trick, but that leads us into "all possible combinations of" territory. Maybe an AvaticaParameterValue class that's effectively a union of typed fields, only one of which has a value.
          Hide
          julianhyde Julian Hyde added a comment -

          Can I take this? I think I know how to wrangle Jackson.

          Show
          julianhyde Julian Hyde added a comment - Can I take this? I think I know how to wrangle Jackson.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Sure, as you like.

          Show
          ndimiduk Nick Dimiduk added a comment - Sure, as you like.
          Show
          julianhyde Julian Hyde added a comment - Nick Dimiduk , Please review https://github.com/julianhyde/incubator-calcite/tree/671-byte-string .
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Thanks for picking this up Julian Hyde. With this patch, I get the following exception from my Phoenix test. The underlying error looks similar to what I was seeing in CALCITE-660.

          2015-04-08 10:10:08,470 WARN  [qtp79389212-558] server.HttpChannel (HttpChannel.java:handle(395)) - /
          java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"])
          	at org.apache.calcite.avatica.remote.JsonHandler.handle(JsonHandler.java:61)
          	at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:46)
          	at org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:55)
          	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
          	at org.eclipse.jetty.server.Server.handle(Server.java:497)
          	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
          	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
          	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"])
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:434)
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:243)
          	at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:158)
          	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:564)
          	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.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:226)
          	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:150)
          	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:112)
          	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.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:36)
          	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796)
          	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
          	at org.apache.calcite.avatica.remote.JsonHandler.decode(JsonHandler.java:51)
          	at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:42)
          	... 10 more
          Caused by: java.lang.IllegalArgumentException: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE
          	at org.apache.calcite.avatica.remote.TypedValue.deserialize(TypedValue.java:85)
          	at org.apache.calcite.avatica.remote.TypedValue.create(TypedValue.java:48)
          	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:606)
          	at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call(AnnotatedMethod.java:120)
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:239)
          	... 31 more
          
          Show
          ndimiduk Nick Dimiduk added a comment - Thanks for picking this up Julian Hyde . With this patch, I get the following exception from my Phoenix test. The underlying error looks similar to what I was seeing in CALCITE-660 . 2015-04-08 10:10:08,470 WARN [qtp79389212-558] server.HttpChannel (HttpChannel.java:handle(395)) - / java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"]) at org.apache.calcite.avatica.remote.JsonHandler.handle(JsonHandler.java:61) at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:46) at org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:55) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"]) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:434) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:243) at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:158) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:564) 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.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:226) 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:150) at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:112) 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.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:36) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942) at org.apache.calcite.avatica.remote.JsonHandler.decode(JsonHandler.java:51) at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:42) ... 10 more Caused by: java.lang.IllegalArgumentException: cannot convert 2015-04-08 (class java.lang.String) to JAVA_SQL_DATE at org.apache.calcite.avatica.remote.TypedValue.deserialize(TypedValue.java:85) at org.apache.calcite.avatica.remote.TypedValue.create(TypedValue.java:48) 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:606) at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call(AnnotatedMethod.java:120) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:239) ... 31 more
          Hide
          julianhyde Julian Hyde added a comment -

          I'll take a look. It should be straightforward. I didn't test for java.sql.Date as I did for ByteString, but I can make it work in the same way.

          Show
          julianhyde Julian Hyde added a comment - I'll take a look. It should be straightforward. I didn't test for java.sql.Date as I did for ByteString, but I can make it work in the same way.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          ByteString, j.u.Date, and j.s.Date are the only three "special" types in ColumnMetaData.Rep, so this should be the only other thing to consider specially here.

          Show
          ndimiduk Nick Dimiduk added a comment - ByteString, j.u.Date, and j.s.Date are the only three "special" types in ColumnMetaData.Rep, so this should be the only other thing to consider specially here.
          Hide
          julianhyde Julian Hyde added a comment -

          I updated the branch with fixes for java.sql.Date etc.

          Show
          julianhyde Julian Hyde added a comment - I updated the branch with fixes for java.sql.Date etc.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Let me take it for a spin.

          Show
          ndimiduk Nick Dimiduk added a comment - Let me take it for a spin.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          With the code on 44d8860, I now get

          java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 0.1 (class java.lang.Double) to OBJECT (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"])
          	at org.apache.calcite.avatica.remote.JsonHandler.handle(JsonHandler.java:61)
          	at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:46)
          	at org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:55)
          	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
          	at org.eclipse.jetty.server.Server.handle(Server.java:497)
          	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
          	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
          	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 0.1 (class java.lang.Double) to OBJECT (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"])
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:434)
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:243)
          	at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:158)
          	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:564)
          	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.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:226)
          	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:150)
          	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:112)
          	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.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:36)
          	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796)
          	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
          	at org.apache.calcite.avatica.remote.JsonHandler.decode(JsonHandler.java:51)
          	at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:42)
          	... 10 more
          Caused by: java.lang.IllegalArgumentException: cannot convert 0.1 (class java.lang.Double) to OBJECT
          	at org.apache.calcite.avatica.remote.TypedValue.deserialize(TypedValue.java:95)
          	at org.apache.calcite.avatica.remote.TypedValue.create(TypedValue.java:49)
          	at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call(AnnotatedMethod.java:120)
          	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:239)
          	... 31 more
          
          Show
          ndimiduk Nick Dimiduk added a comment - With the code on 44d8860 , I now get java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 0.1 (class java.lang.Double) to OBJECT (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"]) at org.apache.calcite.avatica.remote.JsonHandler.handle(JsonHandler.java:61) at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:46) at org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:55) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.apache.calcite.avatica.remote.TypedValue] value failed: cannot convert 0.1 (class java.lang.Double) to OBJECT (through reference chain: org.apache.calcite.avatica.remote.TypedValue["value"]) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:434) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:243) at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:158) at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:564) 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.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:226) 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:150) at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:112) 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.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:36) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942) at org.apache.calcite.avatica.remote.JsonHandler.decode(JsonHandler.java:51) at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:42) ... 10 more Caused by: java.lang.IllegalArgumentException: cannot convert 0.1 (class java.lang.Double) to OBJECT at org.apache.calcite.avatica.remote.TypedValue.deserialize(TypedValue.java:95) at org.apache.calcite.avatica.remote.TypedValue.create(TypedValue.java:49) at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call(AnnotatedMethod.java:120) at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:239) ... 31 more
          Hide
          ndimiduk Nick Dimiduk added a comment -

          If you want to spin it yourself, you can run the Phoenix IT with calcite changes by grabbing https://github.com/ndimiduk/phoenix/tree/WIP-971-Avatica, `mvn clean install -DskipTests`, `cd phoenix-server`, `mvn verify -Dit.test=ThinClientQueryIT`.

          The output I pasted above comes from phoenix-server/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ThinClientQueryIT.xml

          Show
          ndimiduk Nick Dimiduk added a comment - If you want to spin it yourself, you can run the Phoenix IT with calcite changes by grabbing https://github.com/ndimiduk/phoenix/tree/WIP-971-Avatica , `mvn clean install -DskipTests`, `cd phoenix-server`, `mvn verify -Dit.test=ThinClientQueryIT`. The output I pasted above comes from phoenix-server/target/failsafe-reports/TEST-org.apache.phoenix.end2end.ThinClientQueryIT.xml
          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/3e26a873ae17759a9fce12d56c133488558fb771 .
          Hide
          julianhyde Julian Hyde added a comment -

          Resolved in release 1.3.0-incubating (2015-05-30).

          Show
          julianhyde Julian Hyde added a comment - Resolved in release 1.3.0-incubating (2015-05-30).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              ndimiduk Nick Dimiduk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development