-
Notifications
You must be signed in to change notification settings - Fork 595
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: SELECT * EXCEPT [columnA,columnB,...] #9092
Comments
-1. It sounds very ad-hoc and not part of SQL standard, and it's very easy to work around. |
This syntax is from BigQuery. It seems more reasonable for an AP system to support convenient syntax for ad-hoc queries 🤔, and less reasonable for us. |
Similar request for adding new syntax: #7506
|
I found a solution for the specific query you mentioned. Instead of The original query: select * from (select v1, v2, row_number() over (order by v1 asc) rn from t) as foo where rn = 1; The rewritten version: select v1, v2 from (select *, row_number() over (order by v1 asc) rn from t) as foo where rn = 1; |
I think it appears to be some dbt-level stuff, like a macro and users write that and get translated automatically, but still send the original to our Frontend to process. No changes need to be made on our side. I do agree that it improves user experience. Edit: Edit: |
I'm modifying a query related to a 35-cols table, and I think it's hard to work around :( |
Sorry it is my typo 🥵 😿 Originally posted by @st1page in #10265 (comment) |
So at least both Snowflake and BigQuery support similar things. |
We can continue to discuss this request now. @lmatz said:
@fuyufjh how do you think? BTW, I think @neverchanje 's workaround of using |
Well, it only works if we are going to decide the columns to use after the TopN. But maybe we just want to do a TopN and select all columns for later processing. |
BTW, duckdb/snowflake use |
we can implement it too 👀 |
What do you mean? Isn't |
You see, in SQL we can use different word for the same feature, such as "EXCEPT" and "MINUS" |
It is a SQL grammar supported by Snowflake
It can improve the usability of GroupTopN pattern https://www.risingwave.dev/docs/current/sql-pattern-topn/
Still need discussion.
The text was updated successfully, but these errors were encountered: