Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1242945

Summary: Infinispan-dsl-cache translator: Comparison operators don't work for Char column
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Filip Elias <felias>
Component: TeiidAssignee: David Le Sage <dlesage>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Elias <felias>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: atangrin, felias, vhalbert
Target Milestone: CR2Keywords: Documentation
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-29 00:56:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server log none

Description Filip Elias 2015-07-14 13:08:27 UTC
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.

Comment 1 Filip Elias 2015-07-14 13:10:11 UTC
Created attachment 1051837 [details]
server log

Comment 2 Van Halbert 2015-07-16 20:20:38 UTC
*** Bug 1242952 has been marked as a duplicate of this bug. ***

Comment 3 Van Halbert 2015-07-21 00:22:04 UTC
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

Comment 4 Filip Elias 2015-07-21 11:36:39 UTC
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.

Comment 5 Van Halbert 2015-07-21 19:00:31 UTC
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

Comment 6 David Le Sage 2015-09-03 03:37:44 UTC
"Important"-level note detailing this information added to the Reference Guide's "Infinispan DSL Translator" topic.