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

Remove NULL and MISSING from partiql-types #463

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Remove NULL and MISSING from partiql-types #463

merged 1 commit into from
Jun 14, 2024

Conversation

am357
Copy link
Contributor

@am357 am357 commented Jun 13, 2024

Issue #, if available:

As we are making progress towards fleshing out partiql type semantics with more details, the current informal consensus is that NULL and MISSING can only have meaning as values or constraints (E.g., NOT NULL); considering this, this PR removes PartiQLType::NULL and PartiQLType::MISSING.

Important to note is, this PR, types literals NULL and MISSING values as Undefined (or Unknown). The rationale for making this experimental decision is that both NULL and MISSING absent values represent no types; NULL is a property of present types rather than a type itself. E.g., in SQL NULL can be assigned to any type of column. In addition, its presence in operations can lead to NULL. This follows SQL's Three-Valued Logic i.e., "If a null value affects the result of a logical expression, the result is neither true nor false but unknown.".

One could argue that the Unknown type for PartiQL absent values (NULL and MISSING) is an inhabited Bottom Types.

This PR also includes the following:

  1. removes unused partiql_ast_passes::partiql_typer
  2. fixes Clippy multiple_bound_locations errors partiql-eval

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

As we are making progress towards fleshing out partiql type semantics with more details, the current informal consensus is that `NULL` and `MISSING` can only have meaning as values or constraints (E.g., `NOT NULL`); considering this, this PR removes `PartiQLType::NULL` and `PartiQLType::MISSING`.

In addition, it includes the following:
1. removes unused `partiql_ast_passes::partiql_typer`
2. fixes Clippy `multiple_bound_locations` errors `partiql-eval`
Copy link

Conformance comparison report

Base (5dc7c6e) 4ec0c6c +/-
% Passing 90.35% 90.35% 0.00%
✅ Passing 5731 5731 0
❌ Failing 612 612 0
🔶 Ignored 0 0 0
Total Tests 6343 6343 0

Number passing in both: 5731

Number failing in both: 612

Number passing in Base (5dc7c6e) but now fail: 0

Number failing in Base (5dc7c6e) but now pass: 0

@am357 am357 changed the title [WIP] Remove NULL and MISSING from partiql-types Remove NULL and MISSING from partiql-types Jun 14, 2024
@am357 am357 marked this pull request as ready for review June 14, 2024 16:25
@am357 am357 requested a review from jpschorr June 14, 2024 16:25
@am357 am357 merged commit 2e9e4cd into main Jun 14, 2024
16 of 17 checks passed
@am357 am357 deleted the partiql-types-rev branch June 14, 2024 17: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.

2 participants