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]: Sql common table expressions (CTE's) #3137

Merged
merged 8 commits into from
Oct 30, 2024

Conversation

universalmind303
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the enhancement New feature or request label Oct 28, 2024
Copy link

codspeed-hq bot commented Oct 28, 2024

CodSpeed Performance Report

Merging #3137 will not alter performance

Comparing universalmind303:sql-cte (645e633) with main (c78fef4)

Summary

✅ 17 untouched benchmarks

Comment on lines +203 to +213
let selection = match query.body.as_ref() {
SetExpr::Select(selection) => selection,
SetExpr::Query(_) => unsupported_sql_err!("Subqueries are not supported"),
SetExpr::SetOperation { .. } => {
unsupported_sql_err!("Set operations are not supported")
}
SetExpr::Values(..) => unsupported_sql_err!("VALUES are not supported"),
SetExpr::Insert(..) => unsupported_sql_err!("INSERT is not supported"),
SetExpr::Update(..) => unsupported_sql_err!("UPDATE is not supported"),
SetExpr::Table(..) => unsupported_sql_err!("TABLE is not supported"),
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a small drive-by to provide better error messages here.

Comment on lines +593 to +615
sqlparser::ast::TableFactor::TableFunction { .. } => {
unsupported_sql_err!("Unsupported table factor: TableFunction")
}
sqlparser::ast::TableFactor::Function { .. } => {
unsupported_sql_err!("Unsupported table factor: Function")
}
sqlparser::ast::TableFactor::UNNEST { .. } => {
unsupported_sql_err!("Unsupported table factor: UNNEST")
}
sqlparser::ast::TableFactor::JsonTable { .. } => {
unsupported_sql_err!("Unsupported table factor: JsonTable")
}
sqlparser::ast::TableFactor::NestedJoin { .. } => {
unsupported_sql_err!("Unsupported table factor: NestedJoin")
}
sqlparser::ast::TableFactor::Pivot { .. } => {
unsupported_sql_err!("Unsupported table factor: Pivot")
}
sqlparser::ast::TableFactor::Unpivot { .. } => {
unsupported_sql_err!("Unsupported table factor: Unpivot")
}
sqlparser::ast::TableFactor::MatchRecognize { .. } => {
unsupported_sql_err!("Unsupported table factor: MatchRecognize")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

another small driveby for better error messages

@jaychia jaychia removed their request for review October 28, 2024 23:09
Copy link
Member

@kevinzwang kevinzwang left a comment

Choose a reason for hiding this comment

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

LGTM 🙌

@universalmind303 universalmind303 merged commit 404a37e into Eventual-Inc:main Oct 30, 2024
38 checks passed
sagiahrac pushed a commit to sagiahrac/Daft that referenced this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants