Skip to content

chore(trino): backport trinodb/trino#26806 to Trino 477 - #1738

Merged
razvan merged 1 commit into
mainfrom
issue/1733
Nov 9, 2026
Merged

razvan merged 1 commit into
mainfrom
issue/1733

Conversation

@razvan

@razvan razvan commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #1733

Testing

First, using integration tests I cannot reproduce the linked issue with the current unpatched 477-stackable0.0.0-dev nor with 483-stackable0.0.0-dev images.

I could reproduce and test that it is fixed using the following Java snippet:

import io.trino.spi.block.*;
import io.trino.spi.type.RowType;
import java.util.List;
import java.util.Optional;
import static io.trino.spi.type.BigintType.BIGINT;

public class Check {
    public static void main(String[] args) {
        RowType type = RowType.anonymous(List.of(BIGINT));
        LongArrayBlock field = new LongArrayBlock(5, Optional.empty(), new long[] {10, 11, 12, 13, 14});
        RowBlock source = RowBlock.fromFieldBlocks(5, new Block[] {field});
        BlockBuilder builder = type.createBlockBuilder(null, 4);
        // positions array {0, 0, 3, 4}, offset 2, length 2 -> must append rows 3 and 4
        builder.appendPositions(source, new int[] {0, 0, 3, 4}, 2, 2);
        RowBlock result = (RowBlock) builder.buildValueBlock();
        Block f = result.getFieldBlock(0);
        long a = BIGINT.getLong(f, 0);
        long b = BIGINT.getLong(f, 1);
        System.out.println("appended: " + a + ", " + b + " -> " + (a == 13 && b == 14 ? "PATCHED (correct)" : "UNPATCHED (bug present)"));
    }
}

Definition of Done Checklist

Note

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.

Please make sure all these things are done and tick the boxes

  • Changes are OpenShift compatible
  • All added packages (via microdnf or otherwise) have a comment on why they are added
  • Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
  • All packages should have (if available) signatures/hashes verified
  • Add an entry to the CHANGELOG.md file
  • Integration tests ran successfully
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

boil build <IMAGE> --image-version <RELEASE_VERSION> --strip-architecture --load
kind load docker-image <MANIFEST_URI> --name=<name-of-your-test-cluster>

See the output of boil to retrieve the image manifest URI for <MANIFEST_URI>.

@razvan razvan self-assigned this Nov 9, 2026
@razvan
razvan added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit b45aa54 Nov 9, 2026
3 checks passed
@razvan
razvan deleted the issue/1733 branch November 9, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trino 477 LTS: backport trinodb/trino#26806 (MERGE writes duplicates / deletes wrong rows)

2 participants