0

I am using setObject in Preparedstatement for the query SELECT * FROM table_name where column_name = ?. The column is of type DateTimeOffset of SQL Server and the object is OffsetDateTime. But it is giving me the following error:

TEIID30492 Non-comparable expression of type object cannot be used in comparison

I have tried using the same query without Teiid translator, and it is working.

Any ideas about this kind of error?

Manoj Majumdar
  • 505
  • 1
  • 4
  • 23

1 Answers1

1

OffsetDateTime roughly maps to a timestamp with timezone, which is currently not supported. An update was made in Teiid 15 (https://issues.redhat.com/browse/TEIID-5949) to map OffsetDateTime instead to string, which is comparable - but if the comparison is performed in teiid that would be lexically unless you use something like parseTimestamp to handle the conversion.

Steven Hawkins
  • 538
  • 1
  • 4
  • 7