Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty values for variable length attributes #1646

Merged

Conversation

Shelnutt2
Copy link
Member

The ascending order check for offsets is relaxed to allow two or more succeeding values to have the same offset. This allows for a zero length value to on one more cells of a variable length attribute.

Currently writing a single empty value is not supported. Empty cells must be part of a write that includes at least 1 cell with values.

Consider the following examples:

Write to 4 cells (1-4) where the 4th cell of a1 is empty

d1 = {1, 2, 3, 4}
a1_data = {1, 2, 3}
a1_offsets = {0, 1, 2, 3}

write to 4 cells (1-4) where the 2nd cell of a1 is empty

d1 = {1, 2, 3, 4}
a1_data = {1, 2, 3}
a1_offsets = {0, 1, 1, 2}

Copy link
Member

@stavrospapadopoulos stavrospapadopoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor comment typo. I would just add a special case condition for now to not allow single-cell empty values, and we'll handle that case in a new PR.

tiledb/sm/query/query.cc Outdated Show resolved Hide resolved
@Shelnutt2 Shelnutt2 force-pushed the sethshelnutt/ch2300/allow-empty-variable-length-attributes-in branch 2 times, most recently from a79e1fd to 4ec43ed Compare May 16, 2020 22:54
The ascending order check for offsets is relaxed to allow two or more
succeeding values to have the same offset. This allows for a zero length
value to on one more cells of a variable length attribute.

Currently writting a single empty value is not supported. Empty cells
must be part of a write that includes at least 1 cell with values.

Consider the following examples:

Write to 4 cells (1-4) where the 4th cell of a1 is empty

d1 = {1, 2, 3, 4}
a1_data = {1, 2, 3}
a1_offsets = {0, 1, 2, 3}

write to 4 cells (1-4) where the 2nd cell of a1 is empty

d1 = {1, 2, 3, 4}
a1_data = {1, 2, 3}
a1_offsets = {0, 1, 1, 2}
@Shelnutt2 Shelnutt2 force-pushed the sethshelnutt/ch2300/allow-empty-variable-length-attributes-in branch from 4ec43ed to 6f3d632 Compare May 17, 2020 12:41
@Shelnutt2 Shelnutt2 added the backport tags commits to backport to release branch label May 17, 2020
@Shelnutt2 Shelnutt2 merged commit b3dd2b7 into dev May 17, 2020
@Shelnutt2 Shelnutt2 deleted the sethshelnutt/ch2300/allow-empty-variable-length-attributes-in branch May 17, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport tags commits to backport to release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants