calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartman, Trevor" <>
Subject Re: AssertionError in RelDataTypeImpl on remote queries
Date Mon, 02 Feb 2015 22:29:09 GMT
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:

If it helps, I tried to set up my demo project the exact same way:
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"]->[0]->org.apache.calcite.rex.RexCall["operands"]->[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( ~[calcite-avatica-1.0.0-incubating.jar:1.0.0-incubating]
        at org.apache.calcite.avatica.remote.JsonHandler.apply( ~[calcite-avatica-1.0.0-incubating.jar:1.0.0-incubating]
        at org.apache.calcite.avatica.server.AvaticaHandler.handle(

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message