hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-14514: Cloning writerOptions when creating delete event writers …

Open difin opened this issue 3 years ago • 3 comments

…in OrcRecordUpdater.

What changes were proposed in this pull request?

When split-update is enabled for ACID, OrcRecordUpdater creates two sets of writers: one for the insert deltas and one for the delete deltas. The deleteEventWriter is initialized with similar writerOptions as the normal writer, except that it has a different callback handler. Previously, when creating deleteWriterOptions it was needed to instantiate a new writer options similar to regular writer due to lack of clone method in WriterOptions class in Orc code. Now Orc WriterOptions class implements Cloneable and deleteWriterOptions can be instantiated by cloning the regular writer options.

Why are the changes needed?

Improving code quality.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tests and integration tests.

difin avatar Sep 20 '22 23:09 difin

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Sep 21 '22 23:09 sonarqubecloud[bot]

Hey @ayushtkn thanks for reviewing! Can you please merge it? I have no write access yet..

difin avatar Sep 22 '22 18:09 difin

AFAIK, we have to wait 24 hrs after the first approval, so that people in all timezone can have a look. Will merge it tomorrow

ayushtkn avatar Sep 22 '22 18:09 ayushtkn