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

feat: Update SUBSTRING function to accept BYTES types #7861

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

spena
Copy link
Member

@spena spena commented Jul 22, 2021

Description

Update the SUBSTRING function to accept STRING and BYTES types.

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@spena spena requested review from jzaralim and a team July 22, 2021 18:59
@spena spena requested a review from JimGalasyn as a code owner July 22, 2021 18:59
public void shouldReturnNullOnBytesNullValue() {
assertThat(udf.substring((ByteBuffer) null, 1), is(nullValue()));
assertThat(udf.substring((ByteBuffer) null, 1, 1), is(nullValue()));
assertThat(udf.substring("some string", null, 1), is(nullValue()));
Copy link
Contributor

Choose a reason for hiding this comment

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

The first argument should be a ByteBuffer

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@spena spena merged commit fccc56d into confluentinc:master Jul 23, 2021
@spena spena deleted the bytes_substring branch July 23, 2021 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants