YiwenWu commented on code in PR #3790:
URL: https://github.com/apache/calcite/pull/3790#discussion_r1609157021
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -738,30 +739,32 @@ void testCastToExactNumeric(CastType castType,
SqlOperatorFixture f) {
@MethodSource("safeParameters")
void testCastStringToDecimal(CastType castType, SqlOperatorFixture f) {
f.setFor(SqlStdOperatorTable.CAST, VmName.EXPAND);
- if (!DECIMAL) {
- return;
- }
// string to decimal
f.checkScalarExact("cast('1.29' as decimal(2,1))",
"DECIMAL(2, 1) NOT NULL",
- "1.3");
+ "1.2");
Review Comment:
Different systems have different interception methods, I think the return
value `1.3` is also reasonable. Most systems return `1.3`, such as MySQL,
PostgreSQL, Hive, and Spark, but ClickHouse returns `1.2`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]