Types only have a field list if they are "struct" types (i.e. are records with 
several named fields). Scalar types such as boolean, and other structured types 
such as array and map, do not have field lists.
I verified the type is ColumnMetaData.ScalarType.
I don't know how the code got to that point, but the JSON serializer seems to 
think it is looking at a struct type when it is actually not. If you have a 
repro test case can you please log a bug?
I haven't been able to create a repro test case. I tried constructing a 
ResultSetResponse by hand to run through the ObjectMapper, stubbing out various 
deps with "null", but the test continued to pass as I further specified the 
deps to look like mine. I wasn't able to progress past the point where 
attempted to create internalParameters for Meta.Signature and could not access 
SqlItemOperator (only accessible to classes in the same package).

Here's a snapshot from debugger of the ResultSetResponse value that causes the 
exception:
https://dl.dropboxusercontent.com/u/113427/response.jpg

If it helps, I tried to set up my demo project the exact same way:
https://github.com/devth/calcite-map-demo
mvn test -Dsuites=devth.calcite.TestRemoteCalcite
Strangely, it fails with a different exception:

java.lang.RuntimeException: 
com.fasterxml.jackson.databind.JsonMappingException: No serializer found for 
class org.apache.calcite.sql.type.SqlTypeExplicitPrecedenceList and no 
properties discovered to create BeanSerializer (to avoid exception, disable 
SerializationConfig.SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through 
reference chain: 
org.apache.calcite.avatica.remote.ResultSetResponse["signature"]->org.apache.calcite.avatica.Signature["internalParameters"]->java.util.LinkedHashMap["v0stashed"]->com.google.common.collect.RegularImmutableList[0]->org.apache.calcite.rex.RexCall["operands"]->com.google.common.collect.RegularImmutableList[0]->org.apache.calcite.rex.RexInputRef["type"]->org.apache.calcite.sql.type.MapSqlType["keyType"]->org.apache.calcite.sql.type.BasicSqlType["precedenceList"])
        at 
org.apache.calcite.avatica.remote.JsonHandler.handle(JsonHandler.java:61) 
~[calcite-avatica-1.0.0-incubating.jar:1.0.0-incubating]
        at 
org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:46) 
~[calcite-avatica-1.0.0-incubating.jar:1.0.0-incubating]
        at 
org.apache.calcite.avatica.server.AvaticaHandler.handle(AvaticaHandler.java:47) 
~[calcite-avatica-server-1.0.0-incubating.jar:1.0.0-incubating]


Thanks,
Trevor

Reply via email to