Skip to content

Commit 3f5398a

Browse files
committed
Fix api test assertion for implicit type coercion behavior
1 parent 1c385f9 commit 3f5398a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/src/test/java/org/opensearch/sql/api/transpiler/UnifiedQueryTranspilerTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ public void testToSqlWithCustomDialect() {
4343
UnifiedQueryTranspiler customTranspiler =
4444
UnifiedQueryTranspiler.builder().dialect(OpenSearchSparkSqlDialect.DEFAULT).build();
4545
String actualSql = customTranspiler.toSql(plan);
46-
String expectedSql =
47-
normalize(
48-
"SELECT *\nFROM `catalog`.`employees`\nWHERE TRY_CAST(`name` AS DOUBLE) = 1.230E2");
46+
String expectedSql = normalize("SELECT *\nFROM `catalog`.`employees`\nWHERE `name` = 123");
4947
assertEquals(
50-
"Transpiled query using OpenSearchSparkSqlDialect should translate SAFE_CAST to TRY_CAST",
48+
"Numeric types can be implicitly coerced to string with OpenSearchSparkSqlDialect",
5149
expectedSql,
5250
actualSql);
5351
}

0 commit comments

Comments
 (0)