You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2024/08/29 05:54:00 UTC
[jira] [Assigned] (IGNITE-23088) Sql. Serialization/deserialization of some numbers can be incorrect.
[ https://issues.apache.org/jira/browse/IGNITE-23088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeny Stanilovsky reassigned IGNITE-23088:
-------------------------------------------
Assignee: Evgeny Stanilovsky
> Sql. Serialization/deserialization of some numbers can be incorrect.
> --------------------------------------------------------------------
>
> Key: IGNITE-23088
> URL: https://issues.apache.org/jira/browse/IGNITE-23088
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Iurii Gerzhedovich
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: ignite-3
>
> For some reason, a set of numbers can be serialized/deserialized in the right manner.
> Example:
> {code:java}
> SELECT CASE WHEN RAND_UUID() != RAND_UUID() THEN 9223372036854768299 ELSE 3.4028235E38 END FROM t
> org.opentest4j.AssertionFailedError: Invalid serialization / deserialization.
> Expected:
> rel#1323:TableScan.(table=[PUBLIC, T],projects=[CASE(<>(RAND_UUID(), RAND_UUID()), 9223372036854768299:DOUBLE, 3.4028235E38:DOUBLE)],requiredColumns={},sourceId=1)
> Deserialized:
> rel#1324:TableScan.(table=[PUBLIC, T],projects=[CASE(<>(RAND_UUID(), RAND_UUID()), 9.223372036854769E18:DOUBLE, 3.4028235E38:DOUBLE)],requiredColumns={},sourceId=1){code}
> Seems we ignore `typeName` for exact literals. Don't serialize and don't use the information during create a literal.
> A few places for start investigation:
> 1. org.apache.ignite.internal.sql.engine.externalize.RelJson#toJson(org.apache.calcite.rex.RexNode)
> case LITERAL:
> 2. org.apache.ignite.internal.sql.engine.externalize.RelJson#toRex
> if (map.containsKey("literal")) {
> 3. Test NumericCaseTypeCoercionTest
--
This message was sent by Atlassian Jira
(v8.20.10#820010)