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

Add support for dropping columns in Memory #22657

Closed
wants to merge 1 commit into from

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Jul 12, 2024

Release notes

# Memory
* Add support for dropping columns. ({issue}`22657`)

@@ -117,7 +117,10 @@ public synchronized List<Page> getPages(
done = true;
}
// Append missing columns with null values. This situation happens when a new column is added without additional insert.
for (int j = page.getChannelCount(); j < columnIndexes.length; j++) {
for (int j = 0; j < columnIndexes.length; j++) {
if (columnIndexes[j] < page.getChannelCount()) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this related to dropping columns, or a bug fix? Should this be in a separate commit?

}

@Override
public synchronized ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
{
MemoryTableHandle handle = (MemoryTableHandle) tableHandle;
Copy link
Member

Choose a reason for hiding this comment

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

Why this is change necessary?

@@ -16,7 +16,7 @@
import io.trino.spi.connector.ColumnHandle;
import io.trino.spi.type.Type;

public record MemoryColumnHandle(int columnIndex, Type type)
public record MemoryColumnHandle(int columnIndex, String name, Type type, boolean nullable)
Copy link
Member

Choose a reason for hiding this comment

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

Are these changes required for dropping columns?

@ebyhr ebyhr requested a review from wendigo July 16, 2024 11:04
@ebyhr ebyhr force-pushed the ebi/memory-drop-column branch from 8cb6afe to b77e28a Compare July 16, 2024 21:54
@github-actions github-actions bot added the stale label Aug 7, 2024
@trinodb trinodb deleted a comment from github-actions bot Aug 8, 2024
@ebyhr ebyhr added stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. and removed stale labels Aug 8, 2024
@ebyhr ebyhr closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed.
Development

Successfully merging this pull request may close these issues.

3 participants