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

feat: Type check DML #1727

Merged
merged 1 commit into from
Sep 25, 2024
Merged

feat: Type check DML #1727

merged 1 commit into from
Sep 25, 2024

Conversation

joshua-spacetime
Copy link
Collaborator

Description of Changes

Added type checking and name resolution for SQL DML statements

Expected complexity level and risk

2

Testing

pub values: usize,
pub fields: usize,
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Will be nice to know which fields/values failed here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a TODO to that effect

@@ -89,6 +89,14 @@ pub enum Unsupported {
UnqualifiedProjectExpr,
}

#[derive(Error, Debug)]
#[error("Inserting a row with {values} values into {table} which has {fields} fields")]
pub struct InsertError {
Copy link
Contributor

@mamcx mamcx Sep 23, 2024

Choose a reason for hiding this comment

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

Other errors use the convention of enclosing the error fields with "`" as Inserting a row with `{values}`...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 I updated the all the other error messages as well.

@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/type-check branch 3 times, most recently from 206c618 to 6233a33 Compare September 24, 2024 15:35
Base automatically changed from joshua/perf/type-check to master September 24, 2024 16:06
@joshua-spacetime joshua-spacetime force-pushed the joshua/feat/type-check-dml branch 2 times, most recently from 6af3279 to 9c03e47 Compare September 24, 2024 16:30
crates/planner/src/logical/ty.rs Show resolved Hide resolved
@joshua-spacetime joshua-spacetime changed the title feat: Type check SQL DML statements feat: Type check DML Sep 24, 2024
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Sep 24, 2024
Merged via the queue into master with commit 06e5be5 Sep 25, 2024
9 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/feat/type-check-dml branch September 25, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants