Skip to content

Conversation

@fulghum
Copy link
Contributor

@fulghum fulghum commented Jun 2, 2025

The implementation in GMS for IS NULL checks if the value is NULL or not. For record and composite types in Postgres, IS NULL needs to check if each value in the record or composite type is NULL to determine if the value is NULL. See dolthub/doltgresql#1520 for more details.

This change creates a new shared type, named TupleValue, in GMS that is used for record values (and eventually, composite type values). I also considered giving Doltgres it's own, custom IsNull implementation, but the analyzer does specific checks and optimizations when it looks for *expression.IsNull instances, which would stop working correctly.

@fulghum fulghum force-pushed the fulghum/tuple_is_null branch from b4df373 to 6f1d56c Compare June 2, 2025 19:34
@fulghum fulghum requested a review from zachmu June 2, 2025 22:13
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

@fulghum fulghum merged commit c22a9f7 into main Jun 3, 2025
8 checks passed
@fulghum fulghum deleted the fulghum/tuple_is_null branch June 3, 2025 21:29
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.

3 participants