Skip to content

Change dictionary source ID when dictionary block is unwrapped#14305

Merged
dain merged 1 commit intotrinodb:masterfrom
dain:dictionary-block-fix
Sep 27, 2022
Merged

Change dictionary source ID when dictionary block is unwrapped#14305
dain merged 1 commit intotrinodb:masterfrom
dain:dictionary-block-fix

Conversation

@dain
Copy link
Copy Markdown
Member

@dain dain commented Sep 27, 2022

Release notes

(X) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@dain dain requested a review from martint September 27, 2022 00:39
@cla-bot cla-bot bot added the cla-signed label Sep 27, 2022
@dain dain force-pushed the dictionary-block-fix branch from f4a20b2 to 59245c8 Compare September 27, 2022 01:22
@dain dain merged commit ba64cef into trinodb:master Sep 27, 2022
@dain dain deleted the dictionary-block-fix branch September 27, 2022 21:15
@github-actions github-actions bot added this to the 398 milestone Sep 28, 2022
newIds[position] = dictionaryBlock.getId(ids[position]);
}
dictionary = dictionaryBlock.getDictionary();
dictionarySourceId = dictionaryBlock.getDictionarySourceId();
Copy link
Copy Markdown
Member

@sopel39 sopel39 Sep 28, 2022

Choose a reason for hiding this comment

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

it's still wrong. Consider two blocks with nested dictionaries:

topN:
  sourceId: A
  ids: [0, 2, 2]
    nestedY:
      source: 1
      ids: [1, 2, 3]
      block: X
topM:
   sourceId: B
   ids: [0, 1]
   nestedV:
      source: 1
      ids: [1, 2, 3]
      block: Y

You cannot make them

topM':
   sourceId: 1
   ids: [1, 3, 3]
   block: X

topN':
   sourceId: 1
   ids: [1, 2]
   block: Y

topM', topN' cannot have same source ids as topM'.ids != topN'.ids. Even if ids were same, they might have originated from different source and just coincidentally be same

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.

3 participants