andygrove commented on code in PR #62:
URL: https://github.com/apache/datafusion-spark/pull/62#discussion_r4546146661
##########
crates/sqllogictest/test_files/math/negative.slt:
##########
@@ -270,17 +270,29 @@ statement ok
set datafusion.execution.enable_ansi_mode = true;
# Test ANSI mode: negative of minimum values should error (overflow)
-query error DataFusion error: Execution error: Int8 overflow on
negative\(\-128\)
+query error
SELECT negative((-128)::tinyint);
+----
+DataFusion error: Execution error: Int8 overflow on negative(-128)
+
Review Comment:
Nit: the blank lines after the converted error blocks are inconsistent. Some
records have one blank line and others two (the Int8 and Int64 blocks vs. the
Int16 and Int32 ones). `add_months.slt`, `abs.slt` and `elt.slt` have the same
extra trailing blank. It doesn't affect behavior, but normalizing it would keep
the diff tidy.
##########
crates/sqllogictest/test_files/string/elt.slt:
##########
@@ -155,20 +155,32 @@ SELECT elt(1::int, NULL, 'b');
NULL
# Out-of-range positive index errors
-statement error DataFusion error: Execution error: The index 3 is out of
bounds\. The array has 2 elements\.
+statement error
Review Comment:
Question: are there plans to convert the remaining inline `statement error`
lines, such as `math/pmod.slt:74`? Until then the suite has two conventions,
and someone copying an unconverted line could write an unescaped `.` or `(`
that matches more than intended. A follow-up PR is fine. It might be worth
saying in the description that this one is limited to four files.
##########
crates/sqllogictest/test_files/datetime/add_months.slt:
##########
@@ -18,8 +18,11 @@ SELECT add_months('2016-07-30'::date, 10000::int);
2849-11-30
# Test integer overflow
-query error DataFusion error: Arrow error: Compute error: Date arithmetic
overflow: 17012 \+ 2147483647 months
+query error
SELECT add_months('2016-07-30'::date, 2147483647::int);
+----
+DataFusion error: Arrow error: Compute error: Date arithmetic overflow: 17012
+ 2147483647 months
Review Comment:
Observation, no change required: the expected message includes the internal
day number (17012) and the exact month count. The block form is an exact match,
so an arrow-rs rewording of "Date arithmetic overflow" would break this test
when we bump DataFusion. I'm fine with it as is.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]