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

chore: fix alias resolution in n-way join logic #7592

Merged
merged 1 commit into from
May 26, 2021
Merged

chore: fix alias resolution in n-way join logic #7592

merged 1 commit into from
May 26, 2021

Conversation

mjsax
Copy link
Member

@mjsax mjsax commented May 26, 2021

Description

We need to use the alias name (instead of the table name) if an alias exist to verify if the key column is present in the projection.

Testing done

Updated existing QTT tests.

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

@mjsax mjsax requested a review from a team as a code owner May 26, 2021 04:24
@mjsax mjsax mentioned this pull request May 26, 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.

LGTM -- thanks @mjsax .

final SourceName leftInputTableName = leftInputTable.getName();
final List<Column> leftInputTableKeys = leftInputTable.getSchema().key();
final DataSourceNode leftInputTable = getLeftmostSourceNode();
final SourceName leftInputTableName = leftInputTable.getAlias();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the actual fix: getAlias return the alias is there is one; otherwise the table name.

@vcrfxia vcrfxia merged commit 6cb0e4c into confluentinc:master May 26, 2021
@mjsax mjsax deleted the fix-alias-resolution branch May 26, 2021 14:06
Copy link
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

LGTM.

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