Skip to content

Fix NPE when flushing exchange sink writers#11176

Merged
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:exchange-sink-npe-fix
Feb 24, 2022
Merged

Fix NPE when flushing exchange sink writers#11176
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:exchange-sink-npe-fix

Conversation

@linzebing
Copy link
Copy Markdown
Member

Description

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

trino-exchange plugin

How would you describe this change to a non-technical end user or system administrator?

This guards against NullPointException in a corner case. When our last write fills in the buffer exactly, we set currentBuffer to null. And after that we call finish and flushIfNeeded will be called. Therefore a null check is necessary.

A unit test covering this corner case will be added in #11174

Related issues, pull requests, and links

N/A

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:

@losipiuk
Copy link
Copy Markdown
Member

CI: #10772

@losipiuk losipiuk merged commit 1882032 into trinodb:master Feb 24, 2022
@github-actions github-actions bot added this to the 372 milestone Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants