You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/06/16 18:04:21 UTC

[GitHub] [arrow-rs] alamb opened a new pull request, #4425: Parse intervals like `.5` the same as `0.5`

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

   # 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 https://github.com/apache/arrow-rs/issues/4424
   
   # Rationale for this change
    
   It used to work in arrow 41.0.0 and it works this way in postgres (see https://github.com/apache/arrow-rs/issues/4424)
   
   
   # What changes are included in this PR?
   
   Restore arrow 41.0.0 behavior
   
   # Are there any user-facing changes?
   
   Some intervals that were errors are now allowed


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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4425: Parse intervals like `.5` the same as `0.5`

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


##########
arrow-cast/src/parse.rs:
##########
@@ -1944,10 +1958,6 @@ mod tests {
 
         assert_eq!(result, expected);
 
-        // invalid: missing integer

Review Comment:
   There was an explicit test against this behavior, which leads me to believe that this may not be something we want to allow (postgres support not withstanding)
   
   Also, since I think this is a corner case without a large likelihood of being hit, it shouldn't block the arrow 42.0.0 release https://github.com/apache/arrow-rs/issues/4422 -- but I will mention it on the release communications



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


[GitHub] [arrow-rs] tustvold merged pull request #4425: Parse intervals like `.5` the same as `0.5`

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


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


[GitHub] [arrow-rs] alamb commented on pull request #4425: Parse intervals like `.5` the same as `0.5`

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

   > This is fine I suppose, although it does strike me as peculiar. 
   
   That is a great description of most of SQL 😆 
   
   > Is -.5 valid?
   
   It seem to be in postgres:
   
   ```sql
   postgres=# select -.5 months;
    months
   --------
      -0.5
   (1 row)
   ```
   
   I will add a test for this


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


[GitHub] [arrow-rs] alamb commented on pull request #4425: Parse intervals like `.5` the same as `0.5`

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

   ```diff
   +        assert_eq!(
   +            Interval::new(0i32, -15i32, 0),
   +            Interval::parse("-.5 months", &config).unwrap(),
   +        );
   +
   ```
   
   Fails (as you probably suspected). I'll work on that later today


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