[ 
https://issues.apache.org/jira/browse/IGNITE-28852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kirill Tkalenko updated IGNITE-28852:
-------------------------------------
    Ignite Flags: Release Notes Required  (was: Docs Required,Release Notes 
Required)

> Fix DML for overloaded binary operators in Calcite engine
> ---------------------------------------------------------
>
>                 Key: IGNITE-28852
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28852
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Kirill Tkalenko
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: ignite-2
>
> I discovered that when overloading a binary operator in the Calcite engine, 
> it works for SELECT statements but not for UPDATE statements.
> For example, when overloading the binary operator "-" for the operation 
> TIMESTAMP -NIMERIC, SELECT queries work as expected, but UPDATE queries do 
> not; this needs to be fixed.
> {code:java}
>  
> sql("create table person(id int primary key, val_ts timestamp)"); 
> sql("insert into person values (?, ?)", 1, Timestamp.valueOf("2024-01-01 
> 00:00:00"));
> // Check SELECT - works. 
> assertQuery("SELECT val_ts - 1 FROM person") 
>     .returns(Timestamp.valueOf("2023-12-31 00:00:00")) 
>     .check();
> // Check UPDATE - fails. 
> assertQuery("UPDATE person SET val_ts = val_ts - 1 WHERE id = ?") 
>     .withParams(1) 
>     .returns(1L) 
>     .check(); {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to