You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2023/08/10 09:43:24 UTC

[GitHub] [arrow-datafusion] jonahgao opened a new pull request, #7256: feat: Add support for PostgreSQL bitwise XOR operator

jonahgao opened a new pull request, #7256:
URL: https://github.com/apache/arrow-datafusion/pull/7256

   ## 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 #7255.
   
   ## Rationale for this change
   
   `'#'` is PostgreSQL-specific bitwise XOR  operator,  which is not supported in Datafusion.
   ```sh
   ❯  set datafusion.sql_parser.dialect = postgresql;
   0 rows in set. Query took 0.002 seconds.
   
   ❯ select 17#5;
   This feature is not implemented: Unsupported SQL binary operator PGBitwiseXor
   ```
   
   ## What changes are included in this PR?
   -  Add support for PostgreSQL bitwise XOR operator.
   - Unify the display name of bitwise XOR operator.
   
   ## 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)?
   -->
   Yes
   ## Are there any user-facing changes?
   No
   <!--
   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@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb merged pull request #7256: feat: Add support for PostgreSQL bitwise XOR operator

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


-- 
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-datafusion] 2010YOUY01 commented on pull request #7256: feat: Add support for PostgreSQL bitwise XOR operator

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on PR #7256:
URL: https://github.com/apache/arrow-datafusion/pull/7256#issuecomment-1673934402

   Thank you, this display name is more clear than the previous `#` 👍🏼 
   
   Looks good to me, but I suggest also adding some nested expressions for `sqllogictest`s like `select 1#1+1;select 1+1#1;` to make sure sqlparser works correctly for this xor operator


-- 
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-datafusion] jonahgao commented on pull request #7256: feat: Add support for PostgreSQL bitwise XOR operator

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

   Thank you @2010YOUY01 .
   
   The test has been added, and the result is the same as PostgreSQL.
   
   ```sh
   psql=> select 2 * c - 1 # 856 + d + 3, d # 7 >> 4 from signed_integers order by 1,2;
    ?column? | ?column?
   ----------+----------
       -3328 |      128
        -822 |       64
         686 |      -16
             |      -32
   (4 rows)
   ```
   
   


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