-
Notifications
You must be signed in to change notification settings - Fork 761
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
order by sub stmt support db.table.col #6196
order by sub stmt support db.table.col #6196
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
ff534c2
to
5e48a3e
Compare
-- ERROR 1105 (HY000): Code: 1006, displayText = Unable to get field named ""id2"_1". Valid fields: ["\"SUM(id)\"_4"]. | ||
SELECT SUM(id) as id2 FROM a.t ORDER BY a.t.id2; | ||
-- expect err | ||
SELECT DISTINCT(id) as id2 FROM a.t ORDER BY a.t.id2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we need an error, but now it will succeed. I will create a new ISSUE.
'root'@mysqldb 17:57:14 [(none)]> SELECT DISTINCT(id) FROM a.t ORDER BY a.t.id2;
ERROR 1105 (HY000): Code: 1065, displayText = error:
--> SQL:1:39
|
1 | SELECT DISTINCT(id) FROM a.t ORDER BY a.t.id2
| ^^^^^^^ for SELECT DISTINCT, ORDER BY expressions must appear in select list
5e48a3e
to
485c072
Compare
1e5f0af
to
ba8a891
Compare
ba8a891
to
f622f2b
Compare
#6219 merged |
f622f2b
to
984aa15
Compare
@@ -9,4 +9,5 @@ SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" | |||
cd "$SCRIPT_PATH/../../tests" || exit | |||
|
|||
echo "Starting databend-test" | |||
./databend-test '^0[^4]_' --mode 'cluster' --run-dir 0_stateless --skip '02_0057_function_nullif' '02_0058_function_ifnull' | |||
# Now Planner v2 not support cluster execute. So skip some tests that need enable planner v2. | |||
./databend-test '^0[^4]_' --mode 'cluster' --run-dir 0_stateless --skip '02_0057_function_nullif' '02_0058_function_ifnull' '03_0004_select_order_by_db_table_col_v2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the test in this pr needs to enable planner v2 but now we do not support cluster execute, so skip it.
Maybe that's a flaky test? |
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
order by sub stmt support db.table.col.
In this pr just support db.table.col not do any judge for db_name and table_name.
because the struct
ColumnBinding
does not have database_name.And actually I'm not sure this issue can be fixed as this pr.
In my mind it's better fixed with ISSUE #6080
Changelog
Related Issues
Fixes #6192