You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "dariocurr (via GitHub)" <gi...@apache.org> on 2024/09/16 15:50:47 UTC

[PR] Update lexical-core requirement from 0.8 to 1.0 [arrow-rs]

dariocurr opened a new pull request, #6402:
URL: https://github.com/apache/arrow-rs/pull/6402

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #6397 
   
   # 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.
   -->
   
   It solves [RUSTSEC-2023-0086)](https://rustsec.org/advisories/RUSTSEC-2023-0086)
   
   # 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.
   -->
   
   Just update the `Cargo.toml`s and remove unnecessary `unsafe` block according to:
   
   https://github.com/Alexhuszagh/rust-lexical/blob/fd3baac52d87b3253bd46669a498140bf2886833/CHANGELOG#L48
   
   # 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 `breaking change` label.
   -->
   
   No
   


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353469978

   > This compares master with master ?
   
   Sorry that is my script's fault -- both branches are named `master` -- the one in arrow as well as the one in @dariocurr 's fork: https://github.com/dariocurr/arrow-rs/tree/master


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "dariocurr (via GitHub)" <gi...@apache.org>.
dariocurr commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353433732

   Sorry, I was making other improvements and mistakenly pushed on master :cry:


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353341897

   This PR looks good to me -- I am just going to run the cast kernel benchmarks to make sure there are no hidden performance implications


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353792592

   > > This compares master with master ?
   > 
   > Sorry that is my script's fault -- both branches are named `master` -- the one in arrow as well as the one in @dariocurr 's fork: https://github.com/dariocurr/arrow-rs/tree/master
   > 
   > So it is comparing `master` with `master` but the branches are in different repositories
   
   Ah okay, makes sense.


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353779527

   I'll plan to merge this tomorrow unless there are other comments
   
   cc @Jefffrey 


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "dariocurr (via GitHub)" <gi...@apache.org>.
dariocurr commented on code in PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#discussion_r1761805650


##########
arrow-cast/src/display.rs:
##########
@@ -423,7 +423,7 @@ macro_rules! primitive_display {
                 let mut buffer = [0u8; <$t as ArrowPrimitiveType>::Native::FORMATTED_SIZE];
                 // SAFETY:
                 // buffer is T::FORMATTED_SIZE
-                let b = unsafe { lexical_core::write_unchecked(value, &mut buffer) };
+                let b = lexical_core::write(value, &mut buffer);

Review Comment:
   Done with [481883d](https://github.com/apache/arrow-rs/pull/6402/commits/481883d9b8265b37c2fe6e0d5e3a96fe79163c7e)



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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353339656

   Thank you @dariocurr 🙏 
   
   Note -- [CI failures](https://github.com/apache/arrow-rs/actions/runs/10885132190/job/30201988869) on https://github.com/apache/arrow-rs/pull/6401 suggests we will need to update the code
   
   Also @crepererum 's analysis https://github.com/apache/arrow-rs/pull/6401#pullrequestreview-2306908003 is that this will not be a breaking API and thus we'll be able to release this in the next minor release #6340 


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353455162

   I ran with this branch and saw no performance difference (as expected)
   
   ```
   ++ critcmp master master
   group                                                master
   -----                                                ------
   cast binary view to string                           1.00    110.1±0.43µs        ? ?/sec
   cast binary view to string view                      1.00    112.7±0.20µs        ? ?/sec
   cast binary view to wide string                      1.00    114.9±0.33µs        ? ?/sec
   cast date32 to date64 512                            1.00    401.5±0.98ns        ? ?/sec
   cast date64 to date32 512                            1.00    609.6±1.19ns        ? ?/sec
   cast decimal128 to decimal128 512                    1.00      2.9±0.01µs        ? ?/sec
   cast decimal128 to decimal128 512 with same scale    1.00     74.9±0.18ns        ? ?/sec
   cast decimal128 to decimal256 512                    1.00      9.8±0.39µs        ? ?/sec
   cast decimal256 to decimal128 512                    1.00     46.4±0.13µs        ? ?/sec
   cast decimal256 to decimal256 512                    1.00      9.8±0.02µs        ? ?/sec
   cast decimal256 to decimal256 512 with same scale    1.00     75.1±0.15ns        ? ?/sec
   cast dict to string view                             1.00     51.3±0.17µs        ? ?/sec
   cast f32 to string 512                               1.00     22.4±0.11µs        ? ?/sec
   cast f64 to string 512                               1.00     25.3±0.04µs        ? ?/sec
   cast float32 to int32 512                            1.00   1565.7±2.27ns        ? ?/sec
   cast float64 to float32 512                          1.00   1563.9±1.74ns        ? ?/sec
   cast float64 to uint64 512                           1.00      2.1±0.27µs        ? ?/sec
   cast i64 to string 512                               1.00     18.2±0.06µs        ? ?/sec
   cast int32 to float32 512                            1.00   1453.1±1.31ns        ? ?/sec
   cast int32 to float64 512                            1.00   1597.6±2.62ns        ? ?/sec
   cast int32 to int32 512                              1.00    226.3±0.38ns        ? ?/sec
   cast int32 to int64 512                              1.00   1651.7±1.74ns        ? ?/sec
   cast int32 to uint32 512                             1.00   1652.3±9.38ns        ? ?/sec
   cast int64 to int32 512                              1.00   1699.4±2.37ns        ? ?/sec
   cast string to binary view 512                       1.00      3.6±0.01µs        ? ?/sec
   cast string view to binary view                      1.00     95.9±0.24ns        ? ?/sec
   cast string view to dict                             1.00    217.9±0.67µs        ? ?/sec
   cast string view to string                           1.00    194.5±0.47µs        ? ?/sec
   cast string view to wide string                      1.00    199.9±0.42µs        ? ?/sec
   cast time32s to time32ms 512                         1.00    327.9±1.28ns        ? ?/sec
   cast time32s to time64us 512                         1.00   410.9±51.93ns        ? ?/sec
   cast time64ns to time32s 512                         1.00    612.8±1.39ns        ? ?/sec
   cast timestamp_ms to i64 512                         1.00    514.7±2.73ns        ? ?/sec
   cast timestamp_ms to timestamp_ns 512                1.00      2.6±0.01µs        ? ?/sec
   cast timestamp_ns to timestamp_s 512                 1.00    223.4±0.45ns        ? ?/sec
   cast utf8 to date32 512                              1.00     11.4±0.04µs        ? ?/sec
   cast utf8 to date64 512                              1.00     40.2±0.13µs        ? ?/sec
   cast utf8 to f32                                     1.00     15.4±0.02µs        ? ?/sec
   cast wide string to binary view 512                  1.00      5.9±0.01µs        ? ?/sec
   ```


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#discussion_r1761797487


##########
arrow-cast/src/display.rs:
##########
@@ -423,7 +423,7 @@ macro_rules! primitive_display {
                 let mut buffer = [0u8; <$t as ArrowPrimitiveType>::Native::FORMATTED_SIZE];
                 // SAFETY:
                 // buffer is T::FORMATTED_SIZE
-                let b = unsafe { lexical_core::write_unchecked(value, &mut buffer) };
+                let b = lexical_core::write(value, &mut buffer);

Review Comment:
   Safety comment can be removed 



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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#discussion_r1761797487


##########
arrow-cast/src/display.rs:
##########
@@ -423,7 +423,7 @@ macro_rules! primitive_display {
                 let mut buffer = [0u8; <$t as ArrowPrimitiveType>::Native::FORMATTED_SIZE];
                 // SAFETY:
                 // buffer is T::FORMATTED_SIZE
-                let b = unsafe { lexical_core::write_unchecked(value, &mut buffer) };
+                let b = lexical_core::write(value, &mut buffer);

Review Comment:
   Safety comment above this can be removed 



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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "dariocurr (via GitHub)" <gi...@apache.org>.
dariocurr commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353358636

   Thank you for this project, I'm glad to help!


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

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


Re: [PR] Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) [arrow-rs]

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #6402:
URL: https://github.com/apache/arrow-rs/pull/6402#issuecomment-2353463196

   > I ran with this branch and saw no performance difference (as expected)
   > 
   > ```
   > ++ critcmp master master
   > group                                                master
   > -----                                                ------
   > cast binary view to string                           1.00    110.1±0.43µs        ? ?/sec
   > cast binary view to string view                      1.00    112.7±0.20µs        ? ?/sec
   > cast binary view to wide string                      1.00    114.9±0.33µs        ? ?/sec
   > cast date32 to date64 512                            1.00    401.5±0.98ns        ? ?/sec
   > cast date64 to date32 512                            1.00    609.6±1.19ns        ? ?/sec
   > cast decimal128 to decimal128 512                    1.00      2.9±0.01µs        ? ?/sec
   > cast decimal128 to decimal128 512 with same scale    1.00     74.9±0.18ns        ? ?/sec
   > cast decimal128 to decimal256 512                    1.00      9.8±0.39µs        ? ?/sec
   > cast decimal256 to decimal128 512                    1.00     46.4±0.13µs        ? ?/sec
   > cast decimal256 to decimal256 512                    1.00      9.8±0.02µs        ? ?/sec
   > cast decimal256 to decimal256 512 with same scale    1.00     75.1±0.15ns        ? ?/sec
   > cast dict to string view                             1.00     51.3±0.17µs        ? ?/sec
   > cast f32 to string 512                               1.00     22.4±0.11µs        ? ?/sec
   > cast f64 to string 512                               1.00     25.3±0.04µs        ? ?/sec
   > cast float32 to int32 512                            1.00   1565.7±2.27ns        ? ?/sec
   > cast float64 to float32 512                          1.00   1563.9±1.74ns        ? ?/sec
   > cast float64 to uint64 512                           1.00      2.1±0.27µs        ? ?/sec
   > cast i64 to string 512                               1.00     18.2±0.06µs        ? ?/sec
   > cast int32 to float32 512                            1.00   1453.1±1.31ns        ? ?/sec
   > cast int32 to float64 512                            1.00   1597.6±2.62ns        ? ?/sec
   > cast int32 to int32 512                              1.00    226.3±0.38ns        ? ?/sec
   > cast int32 to int64 512                              1.00   1651.7±1.74ns        ? ?/sec
   > cast int32 to uint32 512                             1.00   1652.3±9.38ns        ? ?/sec
   > cast int64 to int32 512                              1.00   1699.4±2.37ns        ? ?/sec
   > cast string to binary view 512                       1.00      3.6±0.01µs        ? ?/sec
   > cast string view to binary view                      1.00     95.9±0.24ns        ? ?/sec
   > cast string view to dict                             1.00    217.9±0.67µs        ? ?/sec
   > cast string view to string                           1.00    194.5±0.47µs        ? ?/sec
   > cast string view to wide string                      1.00    199.9±0.42µs        ? ?/sec
   > cast time32s to time32ms 512                         1.00    327.9±1.28ns        ? ?/sec
   > cast time32s to time64us 512                         1.00   410.9±51.93ns        ? ?/sec
   > cast time64ns to time32s 512                         1.00    612.8±1.39ns        ? ?/sec
   > cast timestamp_ms to i64 512                         1.00    514.7±2.73ns        ? ?/sec
   > cast timestamp_ms to timestamp_ns 512                1.00      2.6±0.01µs        ? ?/sec
   > cast timestamp_ns to timestamp_s 512                 1.00    223.4±0.45ns        ? ?/sec
   > cast utf8 to date32 512                              1.00     11.4±0.04µs        ? ?/sec
   > cast utf8 to date64 512                              1.00     40.2±0.13µs        ? ?/sec
   > cast utf8 to f32                                     1.00     15.4±0.02µs        ? ?/sec
   > cast wide string to binary view 512                  1.00      5.9±0.01µs        ? ?/sec
   > ```
   
   This comparws master with master ? 


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

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