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

[PR] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

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

   ## Which issue does this PR close?
   - Closes #22266
   - Closes #22256 
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

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

   - This change requires documentation changes. Specifically: https://datafusion.apache.org/user-guide/sql/scalar_functions.html#date-part
   - Before changing documentation I would like to get confirmation that the change is OK. There is an ongoing discussion in #22266 
   - This is my first contribution to the project so any feedback is highly welcome (even if it won't be merged)! 
   
   cc @Dandandan 


-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

Posted by "Adam-Alani (via GitHub)" <gi...@apache.org>.
Adam-Alani commented on code in PR #22504:
URL: https://github.com/apache/datafusion/pull/22504#discussion_r3381309620


##########
datafusion/functions/src/datetime/date_part.rs:
##########


Review Comment:
   I'd be in favor of dropping the conditional completely, and always returning float64, following Postgres semantics



-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22504:
URL: https://github.com/apache/datafusion/pull/22504#issuecomment-4628630212

   <!-- semver-check-comment -->
   Thank you for opening this pull request!
   
   Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).
   
   <details>
   <summary>Details</summary>
   
   ```
        Cloning apache/main
       Building datafusion-functions v53.1.0 (current)
          Built [  32.665s] (current)
        Parsing datafusion-functions v53.1.0 (current)
         Parsed [   0.082s] (current)
       Building datafusion-functions v53.1.0 (baseline)
          Built [  28.219s] (baseline)
        Parsing datafusion-functions v53.1.0 (baseline)
         Parsed [   0.085s] (baseline)
       Checking datafusion-functions v53.1.0 -> v53.1.0 (no change; assume patch)
        Checked [   0.562s] 222 checks: 222 pass, 30 skip
        Summary no semver update required
       Finished [  65.000s] datafusion-functions
       Building datafusion-spark v53.1.0 (current)
          Built [  53.421s] (current)
        Parsing datafusion-spark v53.1.0 (current)
         Parsed [   0.062s] (current)
       Building datafusion-spark v53.1.0 (baseline)
          Built [  53.806s] (baseline)
        Parsing datafusion-spark v53.1.0 (baseline)
         Parsed [   0.062s] (baseline)
       Checking datafusion-spark v53.1.0 -> v53.1.0 (no change; assume patch)
        Checked [   0.425s] 222 checks: 219 pass, 3 fail, 0 warn, 30 skip
   
   --- failure function_missing: pub fn removed or renamed ---
   
   Description:
   A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/function_missing.ron
   
   Failed in:
     function datafusion_spark::function::math::pow, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/spark/src/function/math/mod.rs:46
     function datafusion_spark::function::math::expr_fn::pow, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/spark/src/function/math/mod.rs:71
     function datafusion_spark::expr_fn::pow, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/spark/src/function/math/mod.rs:71
   
   --- failure module_missing: pub module removed or renamed ---
   
   Description:
   A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/module_missing.ron
   
   Failed in:
     mod datafusion_spark::function::math::pow, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/spark/src/function/math/pow.rs:18
   
   --- failure struct_missing: pub struct removed or renamed ---
   
   Description:
   A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/struct_missing.ron
   
   Failed in:
     struct datafusion_spark::function::math::pow::SparkPow, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/spark/src/function/math/pow.rs:42
   
        Summary semver requires new major version: 3 major and 0 minor checks failed
       Finished [ 109.779s] datafusion-spark
       Building datafusion-sqllogictest v53.1.0 (current)
          Built [ 166.913s] (current)
        Parsing datafusion-sqllogictest v53.1.0 (current)
         Parsed [   0.023s] (current)
       Building datafusion-sqllogictest v53.1.0 (baseline)
          Built [ 168.743s] (baseline)
        Parsing datafusion-sqllogictest v53.1.0 (baseline)
         Parsed [   0.028s] (baseline)
       Checking datafusion-sqllogictest v53.1.0 -> v53.1.0 (no change; assume patch)
        Checked [   0.111s] 222 checks: 218 pass, 4 fail, 0 warn, 30 skip
   
   --- failure feature_missing: package feature removed or renamed ---
   
   Description:
   A feature has been removed from this package's Cargo.toml. This will break downstream crates which enable that feature.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#cargo-feature-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/feature_missing.ron
   
   Failed in:
     feature memory-accounting in the package's Cargo.toml
   
   --- failure function_missing: pub fn removed or renamed ---
   
   Description:
   A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/function_missing.ron
   
   Failed in:
     function datafusion_sqllogictest::local_balance, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:196
     function datafusion_sqllogictest::set_default_budget, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:147
     function datafusion_sqllogictest::account_balance, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:189
     function datafusion_sqllogictest::set_account_balance, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:168
     function datafusion_sqllogictest::current_context_id, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:127
     function datafusion_sqllogictest::memory_tracker_limit, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:184
     function datafusion_sqllogictest::default_budget, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:153
     function datafusion_sqllogictest::next_context_id, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:99
     function datafusion_sqllogictest::settle_thread_local, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:202
     function datafusion_sqllogictest::set_thread_context_id, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:105
     function datafusion_sqllogictest::set_memory_tracker_limit, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:179
     function datafusion_sqllogictest::reset_account_to_default, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:162
   
   --- failure pub_module_level_const_missing: pub module-level const is missing ---
   
   Description:
   A public const is missing or renamed
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/pub_module_level_const_missing.ron
   
   Failed in:
     SLT_TARGET_PARTITIONS in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/test_context.rs:74
   
   --- failure struct_missing: pub struct removed or renamed ---
   
   Description:
   A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
           ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/struct_missing.ron
   
   Failed in:
     struct datafusion_sqllogictest::OverdraftPanic, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:140
     struct datafusion_sqllogictest::AccountingAllocator, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting.rs:260
     struct datafusion_sqllogictest::AccountingMemoryPool, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/93ef206f9e0a3bf9f01340b4b67d9749849b3bc1/datafusion/sqllogictest/src/accounting_pool.rs:45
   
        Summary semver requires new major version: 4 major and 0 minor checks failed
       Finished [ 339.227s] datafusion-sqllogictest
   ```
   
   </details>


-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22504:
URL: https://github.com/apache/datafusion/pull/22504#issuecomment-5861908226

   Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.


-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

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

   Hey, I opened up a PR making date_part postgres compliant here https://github.com/apache/datafusion/pull/22851, lmk if thats okay. Thanks!


-- 
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] fix: preserve fractional seconds in 'second' and 'millisecond' [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #22504: fix: preserve fractional seconds in 'second' and 'millisecond'
URL: https://github.com/apache/datafusion/pull/22504


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