Skip to content

Fix MAP and ARRAY flat write#18874

Merged
dain merged 4 commits intotrinodb:masterfrom
dain:fix-flat-hash
Sep 1, 2023
Merged

Fix MAP and ARRAY flat write#18874
dain merged 4 commits intotrinodb:masterfrom
dain:fix-flat-hash

Conversation

@dain
Copy link
Copy Markdown
Member

@dain dain commented Aug 31, 2023

Description

The MAP and ARRAY types were incorrectly adjusting the pointer for the variable width data by the fixed width size of the type. Since the variable width and fixed with data are kept in different sections of the flat record, the adjustment is not needed and causes failures.

Fixes #18863

Release notes

(X) Release notes are required, with the following suggested text:

# Section
* Fix index out of bounds exceptions in flat memory data structures using MAP and ARRAY types. ({issue}`18863`)

@dain dain requested a review from martint August 31, 2023 01:07
@cla-bot cla-bot bot added the cla-signed label Aug 31, 2023
@dain dain changed the title Fix Fix MAP and ARRAY flat write Aug 31, 2023
@dain dain requested a review from electrum August 31, 2023 02:05
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/RowType.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/ArrayType.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/MapType.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/RowType.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/MapType.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/type/RowType.java Outdated
@dain dain merged commit 60aac35 into trinodb:master Sep 1, 2023
@dain dain deleted the fix-flat-hash branch September 1, 2023 05:47
@github-actions github-actions bot added this to the 426 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Queries Failed on trino 425 : map keys cannot be null (GENERIC_INTERNAL_ERROR)

3 participants