Skip to content

[MINOR]: Generate empty column at placeholder exec#8553

Merged
alamb merged 1 commit into
apache:mainfrom
synnada-ai:bug_fix/place_holder_empty_col
Dec 15, 2023
Merged

[MINOR]: Generate empty column at placeholder exec#8553
alamb merged 1 commit into
apache:mainfrom
synnada-ai:bug_fix/place_holder_empty_col

Conversation

@mustafasrepo

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

Currently, if there is no column at the place holder exec, it generates at least one dummy column. This causes inconsistency in the subsequent schemas for some edge cases. (Where schema of the PlaceHolderExec itself has 0 columns, but generated RecordBatch from this schema has single column.) Thanks @comphead for bringing this to my attention.

What changes are included in this PR?

This PR fixes above mentioned problem.

Are these changes tested?

Yes new test is added. Which is the test in the discussion

Are there any user-facing changes?

@mustafasrepo mustafasrepo changed the title Generate empty column at placeholder exec [MINOR]: Generate empty column at placeholder exec Dec 15, 2023
@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Dec 15, 2023
ret
})
.collect(),
// Even if column number is empty we can generate single row.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit 28e7f60 into apache:main Dec 15, 2023
@alamb

alamb commented Dec 15, 2023

Copy link
Copy Markdown
Contributor

Thanks @mustafasrepo and @Dandandan

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

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants