Comparison operators returns wrong result for column of type Character. Sample queries: SELECT CharValue FROM SmallA WHERE SmallA.CharValue < '1' SELECT CharValue FROM SmallA WHERE SmallA.CharValue = '1' These queries return no row even though they should have returned more than 20 rows. Log is in the attachment.
Created attachment 1051837 [details] server log
*** Bug 1242952 has been marked as a duplicate of this bug. ***
I found the protocol buffers doc on supported data types [1]. Looking at the matrix, there's isn't a specific char type, but only string types. The char types that are defined in the protobuf file are int32, for which corresponds to an 'int' type. And when I change the model to correspond, the queries work. And as part of the next few changes, I've change the data types to be derived from the protobuf definition, instead of the class. However, if the class isn't defined correctly based on the protobuf, this issue will occur. [1] https://developers.google.com/protocol-buffers/docs/proto#scalar
Van, If you change the data type of charValue column to integer (in the Java POJO and the model) then it will no longer be a column of type Char. I know that the protocol buffer doesn't support Char so I set the charValue column to int32 in the proto file and I converted it to/from Char using the marshaller. If this approach doesn't work and there is no other way to make it work, we should specify in the documentation that Char column is not supported for infinispan translator.
To be added to the docs: - To determine what the data types that are supported when accessing a JDG Remote Cache and using Google Protobufs for serialization, see [1] - Char data type is not currently a supported protobuf data type, use String data type or handle the conversion in the marshaller. [1] [1] https://developers.google.com/protocol-buffers/docs/proto#scalar
"Important"-level note detailing this information added to the Reference Guide's "Infinispan DSL Translator" topic.