Skip to content

Ensure join correctness for enums of different types#3382

Merged
angelamayxie merged 7 commits intomainfrom
angela/compare_convert
Jan 15, 2026
Merged

Ensure join correctness for enums of different types#3382
angelamayxie merged 7 commits intomainfrom
angela/compare_convert

Conversation

@angelamayxie
Copy link
Copy Markdown
Contributor

@angelamayxie angelamayxie commented Jan 15, 2026

fixes dolthub/dolt#10311

branched from #3381

Enums of different types join based on their string value, not their underlying int value. Ensures join correctness for enums of different types by doing the following:

  • use type-aware conversion with enum origin types to properly convert enums to their string values
  • disable Lookup joins for enums of different types. Lookup joins should not work here because enums are indexed based on their int values.
  • disable Merge joins for enums of different types. Merge joins should not work here because enums are sorted based on their int values.

@angelamayxie angelamayxie changed the title Use origin type during type conversion in compare expressions Ensure join correctness for enums of different types Jan 15, 2026
@angelamayxie angelamayxie marked this pull request as ready for review January 15, 2026 21:32
@angelamayxie angelamayxie merged commit 4df78fc into main Jan 15, 2026
8 checks passed
@angelamayxie angelamayxie deleted the angela/compare_convert branch January 15, 2026 22:03
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.

enums should match based on int value for foreign keys and string value for joins

2 participants