caicancai commented on code in PR #3790:
URL: https://github.com/apache/calcite/pull/3790#discussion_r1609162857
##########
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:
There doesn't seem to be a standard set of sql rules here, so maybe we
should think about what makes sense mathematically or what makes sense to
follow the rules of most databases
--
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]