Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-28027][SQL] Add bitwise shift left/right operators #24852

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@wangyum
Copy link
Contributor

commented Jun 12, 2019

What changes were proposed in this pull request?

This pr add bitwise shift left/right operators:

Operator Description Example Result
<< bitwise shift left 1 << 4 16
>> bitwise shift right 8 >> 2 2

PostgreSQL, Vertica, Redshift and MySQL support these operators:
https://www.postgresql.org/docs/11/functions-math.html
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/LanguageElements/Operators/BitwiseOperators.htm
https://docs.aws.amazon.com/redshift/latest/dg/r_OPERATOR_SYMBOLS.html
https://dev.mysql.com/doc/refman/5.7/en/bit-functions.html

How was this patch tested?

unit tests

@SparkQA

This comment has been minimized.

Copy link

commented Jun 12, 2019

Test build #106423 has finished for PR 24852 at commit acfa50f.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
@wangyum

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Close it because it conflicts with the table definition:

CREATE TABLE parquet_compat(
  col_0 ARRAY<INT>,
  col_1 ARRAY<STRING>,
  col_2 ARRAY<ARRAY<INT>>
-----------------------^^^
)

https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/106423/testReport/org.apache.spark.sql.hive/ParquetHiveCompatibilitySuite/array/

@wangyum wangyum closed this Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.