Skip to content

Replace Block.getChildren with ColumnarRow#13356

Merged
findepi merged 1 commit intotrinodb:masterfrom
homar:homar/dont_use_block_get_children_in_delta_lake
Aug 1, 2022
Merged

Replace Block.getChildren with ColumnarRow#13356
findepi merged 1 commit intotrinodb:masterfrom
homar:homar/dont_use_block_get_children_in_delta_lake

Conversation

@homar
Copy link
Copy Markdown
Member

@homar homar commented Jul 26, 2022

Description

We should not use Block.getChildren(). It is internal routine not intended to use directly. May not work always.

Is this change a fix, improvement, new feature, refactoring, or other?
a fix
Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)
a connector
How would you describe this change to a non-technical end user or system administrator?
technical change, not interesting for the end user

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Jul 26, 2022
@homar homar requested review from findepi and losipiuk July 26, 2022 14:51
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Put this outside of the for loop

@homar homar force-pushed the homar/dont_use_block_get_children_in_delta_lake branch 2 times, most recently from c2d3d2a to 63f8c93 Compare July 27, 2022 14:50
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can move this one out as well

Copy link
Copy Markdown
Member Author

@homar homar Jul 28, 2022

Choose a reason for hiding this comment

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

I actually tried that and it made some tests fail with IndexOutOfBound in Block unmodifiedColumns = columnarRow.getField(1);
We have to be in the else branch of the if to be safe to do that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right, that might happen if all rows are being updated. You could make the field Optional or nullable. Might be worth it if toColumnarRow might do a meaningful amount of work

@homar homar force-pushed the homar/dont_use_block_get_children_in_delta_lake branch 2 times, most recently from 52d122e to 0727444 Compare July 29, 2022 17:19
@homar
Copy link
Copy Markdown
Member Author

homar commented Aug 1, 2022

@alexjo2144 is it ok now ?

@homar
Copy link
Copy Markdown
Member Author

homar commented Aug 1, 2022

@findepi can we merge this ?

@findepi findepi added the no-release-notes This pull request does not require release notes entry label Aug 1, 2022
@findepi findepi merged commit 2785cf0 into trinodb:master Aug 1, 2022
@github-actions github-actions bot added this to the 392 milestone Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

3 participants