jonahgao commented on code in PR #13806: URL: https://github.com/apache/datafusion/pull/13806#discussion_r1888042583
########## datafusion/sqllogictest/test_files/options.slt: ########## @@ -192,19 +192,95 @@ select arrow_typeof(00009999999999999999999999999999999999.9999), ---- Decimal128(38, 4) Decimal128(38, 4) Decimal128(20, 0) -# precision overflow -statement error DataFusion error: SQL error: ParserError\("Cannot parse 123456789012345678901234567890123456789 as i128 when building decimal: precision overflow"\) -select 123456789.012345678901234567890123456789 +# scientific notation +query RTRTRT +select 1.23e3, arrow_typeof(1.23e3), + +1.23e1, arrow_typeof(+1.23e1), + -1234.56e-3, arrow_typeof(-1234.56e-3) +---- +1230 Decimal128(3, -1) 12.3 Decimal128(3, 1) -1.23456 Decimal128(6, 5) + +query RTRTRT +select 1.23e-2, arrow_typeof(1.23e-2), + 1.23456e0, arrow_typeof(1.23456e0), + -.0123e2, arrow_typeof(-.0123e2) +---- +0.0123 Decimal128(4, 4) 1.23456 Decimal128(6, 5) -1.23 Decimal128(3, 2) + +# Decimal256 cases +query RT +select 123456789.0123456789012345678901234567890, + arrow_typeof(123456789.0123456789012345678901234567890) +---- +123456789.012345678901 Decimal256(40, 31) Review Comment: Display is incomplete due to rounding in sqllogictest -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org