Skip to content

Commit 2272b31

Browse files
IGNITE-28888 SQL Calcite: Add test for literal to UUID conversion (#13363)
1 parent 6b70c74 commit 2272b31

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/DataTypesPlannerTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.util.Arrays;
2121
import java.util.List;
22+
import java.util.UUID;
2223
import java.util.function.Predicate;
2324
import org.apache.calcite.rel.RelNode;
2425
import org.apache.calcite.rel.core.SetOp;
@@ -127,4 +128,15 @@ public void testSetOpNullableDateCast() throws Exception {
127128
assertPlan("SELECT NULL::DATE UNION ALL SELECT TIMESTAMP '2025-07-04 10:00:00'", createSchema(),
128129
rel -> rel.fieldIsNullable(0));
129130
}
131+
132+
/** */
133+
@Test
134+
public void testLiteralToUuidConversion() throws Exception {
135+
IgniteSchema schema = createSchema(createTable("T", IgniteDistributions.single(), "UID", SqlTypeName.UUID));
136+
137+
UUID uuid1 = UUID.randomUUID();
138+
UUID uuid2 = UUID.randomUUID();
139+
140+
assertPlan("SELECT * FROM t WHERE uid in ('" + uuid1 + "', '" + uuid2 + "')", schema, isTableScan("T"));
141+
}
130142
}

0 commit comments

Comments
 (0)