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

test: add tests validating use of ROWOFFSET/ROWPARTITION user columns #7770

Conversation

Sullivan-Patrick
Copy link
Contributor

Description

Adds testing to ensure ROWOFFSET and ROWPARTITION can freely be used as user columns before KLIP-50 is integrated.

Testing done

Individual tests for ROWOFFSET and ROWPARTITION

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 #")

@Sullivan-Patrick Sullivan-Patrick requested a review from a team as a code owner July 7, 2021 22:03
@ghost
Copy link

ghost commented Jul 7, 2021

@confluentinc It looks like @Sullivan-Patrick just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@Sullivan-Patrick Sullivan-Patrick changed the title Add tests validating use of ROWOFFSET/ROWPARTITION user columns chore: add tests validating use of ROWOFFSET/ROWPARTITION user columns Jul 7, 2021
Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks @Sullivan-Patrick . The new tests you've added validate that the names ROWPARTITION and ROWOFFSET may be used as output column aliases, but we also need tests validating that they can be used in source schemas as well.

Also, I think it's fine to just have a single test covering the use of both aliases (minor optimization in order to reduce the number of new tests being added, since we don't expect the behavior for the two aliases to be different).

It might also be interesting to add a test where the new columns have the same data types as the pseudocolumns that will be added as part of KLIP-50.

I've also updated the PR title to reflect that this is a test-only change.

@vcrfxia vcrfxia changed the title chore: add tests validating use of ROWOFFSET/ROWPARTITION user columns test: add tests validating use of ROWOFFSET/ROWPARTITION user columns Jul 7, 2021
Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Hey @Sullivan-Patrick thanks for the updates. It looks like we're still missing tests for source columns named ROWPARTITION/ROWOFFSET, though. Both tests are currently testing the use of those names as output column aliases only.

}
},
{
"name": "test ROWOFFSET and ROWPARTITION user columns with data types the pseudocolumns will later represent",
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to have to change the test name once KLIP-50 is implemented (we'd have to remember to rename the historic plan files if so).

Suggested change
"name": "test ROWOFFSET and ROWPARTITION user columns with data types the pseudocolumns will later represent",
"name": "test ROWOFFSET and ROWPARTITION user columns with pseudocolumn data types",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops, I totally missed the source schema thing the first time around. Hopefully the latest commits address everything.

Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks @Sullivan-Patrick -- LGTM!

@vcrfxia vcrfxia merged commit eb71eae into confluentinc:master Jul 9, 2021
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.

2 participants