andygrove commented on code in PR #76:
URL: https://github.com/apache/datafusion-spark/pull/76#discussion_r4642981848


##########
crates/sqllogictest/test_files/datetime/next_day.slt:
##########
@@ -92,12 +92,12 @@ NULL
 # arithmetic, rather than panicking. Cast the Date32 result to Int32 to assert
 # the epoch day directly (these dates are past the printable range).
 query I
-SELECT arrow_cast(next_day(arrow_cast(95026236, 'Date32'), 'Mon'::string), 
'Int32');
+SELECT unix_date(next_day(date_from_unix_date(95026236), 'Mon'::string));

Review Comment:
   Good catch, thanks. Restored the outer `arrow_cast(..., 'Int32')` on both 
queries in c367a7c and kept `date_from_unix_date` inside. Both pass in evaluate 
mode now, and the PySpark runner still passes them on Spark 4.2.0 through its 
`unix_date` translation.



##########
crates/sqllogictest/test_files/string/format_string.slt:
##########
@@ -868,97 +868,97 @@ Upper: NULL
 
 ## NULL argument with string format
 query T
-SELECT format_string('Value: %s', arrow_cast(NULL, 'Utf8View'));
+SELECT format_string('Value: %s', NULL::STRING);
 ----
 Value: null
 
 ## NULL with string format (uppercase)
 query T
-SELECT format_string('Upper: %S', arrow_cast(NULL, 'Utf8View'));
+SELECT format_string('Upper: %S', NULL::STRING);
 ----
 Upper: NULL
 
 ## NULL with integer format using arrow_cast
 query T
-SELECT format_string('Integer: %d', arrow_cast(NULL, 'Int32'));
+SELECT format_string('Integer: %d', NULL::INT);

Review Comment:
   Done in c367a7c. I removed `using arrow_cast` from the 26 headings whose 
queries now use `::`. The one left is above the commented-out `Float16` query, 
which still uses `arrow_cast`. The three `floor.slt` notes now explain that 
`::` binds tighter than unary minus, so `-128::TINYINT` would be 
`-(128::TINYINT)` and overflow. That's why the boundary literals are in 
parentheses.



-- 
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]

Reply via email to