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

[FLINK-9907] [table] Add CRC32 support #6382

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[FLINK-9907] [table] Add CRC32 support #6382

wants to merge 3 commits into from

Conversation

xueyumusic
Copy link
Contributor

What is the purpose of the change

This PR adds CRC32 checksum compute in table api and sql.It returns the cyclic redundancy check value of a given string as a 32-bit unsigned value, null if string is null
The syntax is like CRC32('test') = 3632233996

Brief change log

expressionDsl and hashExpression Api
codegen and HashCalCallGen

Verifying this change

This change added tests and can be verified as follows:

  • Added ScalarFunctionsTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (not documented yet, patch doc afterward)

Copy link
Contributor

@yanghua yanghua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'd better add more documentation in docs/dev/table/sql.md and docs/dev/table/tableApi.md for the function crc32

'f33.crc32(),
"crc32(f33)",
"CRC32(f33)",
"null")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think add more test case, for example :

testAllApis(
  'f33.crc32(),
  "f33.crc32()",
  "CRC32(f33)",
  "null")

looks better to me.

@twalthr twalthr changed the title [FLINK-9907][Table API & SQL] add CRC32 support [FLINK-9907] [table] Add CRC32 support Jul 31, 2018
@flinkbot
Copy link
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants