[ 
https://issues.apache.org/jira/browse/IGNITE-23804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903406#comment-17903406
 ] 

Ignite TC Bot commented on IGNITE-23804:
----------------------------------------

{panel:title=Branch: [pull/11707/head] Base: [master] : Possible Blockers 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Snapshots 1{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8199228]]
* IgniteSnapshotTestSuite: 
IgniteClusterSnapshotSelfTest.testClientHandlesSnapshotFailOnStartStage[encryption=true,
 onlyPrimay=true] - Test has low fail rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/11707/head] Base: [master] : New Tests 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=8197384]]
* {color:#013220}IgniteCalciteTestSuite: IntervalTest.testIntervalNumCast - 
PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8197469&buildTypeId=IgniteTests24Java8_RunAll]

> Calcite engine. Wrong casting to interval
> -----------------------------------------
>
>                 Key: IGNITE-23804
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23804
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite, ise
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There are a couple of bugs when casting numeric to interval, for example, 
> literal to interval casted correctly:
> {noformat}
> assertEquals(Duration.ofDays(1), eval("CAST(1 AS INTERVAL DAYS)"));
> {noformat}
> But explicetely casted literal give a wrong result:
> {noformat}
> assertEquals(Duration.ofDays(1), eval("CAST(1::INT AS INTERVAL DAYS)"));
> {noformat}
> expected:<PT24H> but was:<PT16M40S>
> Another problem, floating point values can be casted correctly:
> {noformat}
> assertEquals(Duration.ofHours(36), eval("CAST(1.5 AS INTERVAL DAYS) FROM 
> t"));{noformat}
> But the same values pushed from downstream are rounded to integer:
> {noformat}
> assertEquals(Duration.ofHours(36), eval("CAST(f AS INTERVAL DAYS) FROM 
> (VALUES(1.5)) AS t(f)"));
> {noformat}
> expected:<PT36H> but was:<PT48H>



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

Reply via email to