You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "emilk (via GitHub)" <gi...@apache.org> on 2026/01/23 09:35:39 UTC

[PR] Improve error message [datafusion]

emilk opened a new pull request, #19954:
URL: https://github.com/apache/datafusion/pull/19954

   * Follow-up to: https://github.com/apache/datafusion/pull/17565
   * Related: https://github.com/apache/arrow-rs/pull/8290
   
   ## Rationale for this change
   I believe that error messages should be as readable as possible. Aim for `rustc` more than `gcc`.
   
   `Display` is the nice, user-facing formatter. `Debug` is for… well, debugging.
   
   ## What changes are included in this PR?
   Change a bunch of `{:?}` format string to `{}`. I'm sure I missed a lot of them, because I know of no way to enforce this without
   * https://github.com/rust-lang/rust-clippy/issues/8581
   
   ## Are these changes tested?
   I assume CI runs `cargo test` :)
   
   ## Are there any user-facing changes?
   Yes! Error messages should be a bit more readable now.


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19954:
URL: https://github.com/apache/datafusion/pull/19954#discussion_r2722303088


##########
datafusion/core/tests/dataframe/mod.rs:
##########
@@ -4801,7 +4801,7 @@ async fn unnest_with_redundant_columns() -> Result<()> {
         @r"
     Projection: shapes.shape_id [shape_id:UInt32]
       Unnest: lists[shape_id2|depth=1] structs[] [shape_id:UInt32, shape_id2:UInt32;N]
-        Aggregate: groupBy=[[shapes.shape_id]], aggr=[[array_agg(shapes.shape_id) AS shape_id2]] [shape_id:UInt32, shape_id2:List(Field { data_type: UInt32, nullable: true });N]
+        Aggregate: groupBy=[[shapes.shape_id]], aggr=[[array_agg(shapes.shape_id) AS shape_id2]] [shape_id:UInt32, shape_id2:List(UInt32);N]

Review Comment:
   👍 



##########
datafusion/sqllogictest/test_files/datetime/date_part.slt:
##########
@@ -40,11 +40,11 @@ with t as (values
 )
 SELECT
   -- nanoseconds, with no, utc, and local timezone
-  arrow_cast(column1, 'Timestamp(Nanosecond, None)') as ts_nano_no_tz,
+  arrow_cast(column1, 'Timestamp(ns)') as ts_nano_no_tz,

Review Comment:
   I think it is valuable to have at least a few tests that verify the old syntax still works, FWIW



-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages [datafusion]

Posted by "emilk (via GitHub)" <gi...@apache.org>.
emilk commented on PR #19954:
URL: https://github.com/apache/datafusion/pull/19954#issuecomment-3790336855

   That would be appreciated ❤️ 


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages with nicer formatting of Date and Time types [datafusion]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer merged PR #19954:
URL: https://github.com/apache/datafusion/pull/19954


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages [datafusion]

Posted by "emilk (via GitHub)" <gi...@apache.org>.
emilk commented on PR #19954:
URL: https://github.com/apache/datafusion/pull/19954#issuecomment-3790350592

   Btw, datafusion currently uses `;N` suffix for "nullable", while `arrow-rs` now uses an `nullable ` prefix instead: `Int32;N` vs `nullable Int32`
   
   Maybe we want to follow arrow-rs here?


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages [datafusion]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on PR #19954:
URL: https://github.com/apache/datafusion/pull/19954#issuecomment-3789875415

   Looks great, just a few easy CI errors.LMK if you want me to knock them out.


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Improve error messages with nicer formatting of Date and Time types [datafusion]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on code in PR #19954:
URL: https://github.com/apache/datafusion/pull/19954#discussion_r2722369592


##########
datafusion/sqllogictest/test_files/datetime/date_part.slt:
##########
@@ -40,11 +40,11 @@ with t as (values
 )
 SELECT
   -- nanoseconds, with no, utc, and local timezone
-  arrow_cast(column1, 'Timestamp(Nanosecond, None)') as ts_nano_no_tz,
+  arrow_cast(column1, 'Timestamp(ns)') as ts_nano_no_tz,

Review Comment:
   Good call, added.



-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org