Skip to content

Conversation

@kecookier
Copy link

@kecookier kecookier commented Apr 22, 2025

What changes were proposed in this pull request?

Set dstBatch's decimal and precision when DecimalConvertColumnReader::next.
Fix ORC-1881.

Why are the changes needed?

During decimal-to-decimal conversion in SchemaEvolution, the target decimal's scale and precision are incorrectly initialized to zero, producing a corrupted ColumnVectorBatch.

How was this patch tested?

Unit test.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the CPP label Apr 22, 2025
@kecookier kecookier force-pushed the backport-2194-branch-2.0 branch from 1da647e to 0d50dff Compare April 22, 2025 13:10
@kecookier
Copy link
Author

@dongjoon-hyun Would you mind helping investigate the CI cpp-linter failures? This seems to be an unrelated issue, and I'm not familiar with this check.

@wgtmac
Copy link
Member

wgtmac commented Apr 23, 2025

I think d8e7dbf is missing in the branch-2.0

@kecookier
Copy link
Author

I think d8e7dbf is missing in the branch-2.0

I'll try this.

@github-actions github-actions bot added the INFRA label Apr 23, 2025
@kecookier
Copy link
Author

I think d8e7dbf is missing in the branch-2.0

@wgtmac You're right, this commit resolves the cpp-linter issue. As a first step, we should backport this PR. I've submitted #2200 for the backport. Kindly review when you have time.

@dongjoon-hyun
Copy link
Member

Could you rebase this to branch-2.0 once more, @kecookier ?

@dongjoon-hyun dongjoon-hyun added this to the 2.0.5 milestone Apr 24, 2025
@dongjoon-hyun dongjoon-hyun changed the title [branch-2.0] Backport: ORC-1881: [C++] Populate dstBatch's scale and precision in DecimalConvertColumnReader ORC-1881: [C++] Populate dstBatch's scale and precision in DecimalConvertColumnReader Apr 24, 2025
…vertColumnReader

Set dstBatch's decimal and precision when `DecimalConvertColumnReader::next`.
Fix ORC-1881.

During decimal-to-decimal conversion in `SchemaEvolution`, the target decimal's scale and precision are incorrectly initialized to zero, producing a corrupted `ColumnVectorBatch`.

Unit test.

No.

Closes apache#2194 from kecookier/fix-decimal-2-decimal.

Authored-by: zhaokuo03 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@kecookier kecookier force-pushed the backport-2194-branch-2.0 branch from 0d50dff to 012e814 Compare April 25, 2025 03:19
@kecookier
Copy link
Author

@dongjoon-hyun Thanks for the review, I've already rebased it onto branch-2.0.

wgtmac pushed a commit that referenced this pull request Apr 25, 2025
…vertColumnReader

### What changes were proposed in this pull request?

Set dstBatch's decimal and precision when `DecimalConvertColumnReader::next`.
Fix ORC-1881.

### Why are the changes needed?

During decimal-to-decimal conversion in `SchemaEvolution`, the target decimal's scale and precision are incorrectly initialized to zero, producing a corrupted `ColumnVectorBatch`.

### How was this patch tested?

Unit test.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #2197 from kecookier/backport-2194-branch-2.0.

Authored-by: zhaokuo03 <[email protected]>
Signed-off-by: Gang Wu <[email protected]>
@wgtmac wgtmac closed this Apr 25, 2025
@wgtmac
Copy link
Member

wgtmac commented Apr 25, 2025

Thanks @kecookier and @dongjoon-hyun! I've merged it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants