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

fix(core): fix symbol reader lookups at minimal capacity #2928

Merged
merged 2 commits into from Jan 19, 2023

Conversation

bziobrowski
Copy link
Contributor

Fixes hashing inconsistency between symbol reader and writer that makes reader lookups fail for some symbol values when capacity is low (e.g. 2) .

Example :

CREATE TABLE IF NOT EXISTS 'logs'
(
  'id'      symbol CAPACITY 2,
  'service' symbol CAPACITY 10 INDEX CAPACITY 12288,
  'level'   symbol CAPACITY 5 INDEX CAPACITY 2048,
  'source'  string,
  'message' string,
  'ts'      timestamp
) timestamp(ts) PARTITION BY month;

select id from logs where id = '10';
--returns no results 

@puzpuzpuz puzpuzpuz assigned puzpuzpuz and unassigned puzpuzpuz Jan 18, 2023
@puzpuzpuz puzpuzpuz self-requested a review January 18, 2023 10:54
@puzpuzpuz puzpuzpuz added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels Jan 18, 2023
@ideoma
Copy link
Collaborator

ideoma commented Jan 19, 2023

[PR Coverage check]

😍 pass : 1 / 1 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/SymbolMapReaderImpl.java 1 1 100.00%

@bluestreak01 bluestreak01 merged commit 0b4fdbd into master Jan 19, 2023
@bluestreak01 bluestreak01 deleted the symbol_hash_fix branch January 19, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants