We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
main
mysql> create table t(a int); Query OK, 0 rows affected (0.07 sec) mysql> insert into t values(1); +-------------------------+ | number of rows inserted | +-------------------------+ | 1 | +-------------------------+ 1 row in set (0.05 sec) Read 1 rows, 5.00 B in 0.033 sec., 30.15 rows/sec., 150.75 B/sec. mysql> insert into t values(2); +-------------------------+ | number of rows inserted | +-------------------------+ | 1 | +-------------------------+ 1 row in set (0.06 sec) Read 1 rows, 5.00 B in 0.041 sec., 24.63 rows/sec., 123.16 B/sec. mysql> with tt as (select sum(a) as a from t) select t._row_id, t.a/tt.a from t, tt; ERROR 1105 (HY000): BadArguments. Code: 1006, Text = Unable to get field named "3". Valid fields: ["0", "2"]. mysql> with tt as (select sum(a) as a from t) select t._row_id, t.a/tt.a from tt,t; +----------------------+--------------------+ | _row_id | a / a | +----------------------+--------------------+ | 18446735277616529408 | 0.3333333333333333 | | 18446739675663040512 | 0.6666666666666666 | +----------------------+--------------------+ 2 rows in set (0.14 sec) Read 4 rows, 20.00 B in 0.052 sec., 77.03 rows/sec., 385.16 B/sec.
No response
The text was updated successfully, but these errors were encountered:
get_table_index will fetch the table by rev order.
t._row_id should bind to the left table t of join instead of the t in CTE.
t._row_id
pub fn get_table_index( &self, database_name: Option<&str>, table_name: &str, ) -> Option<IndexType> { // Use `rev` is because a table may be queried multiple times in join clause, // and the virtual columns should add to the table newly added. self.tables .iter() .rev() .find(|table| match database_name { Some(database_name) => { table.database == database_name && table.name == table_name || table.alias_name == Some(table_name.to_string()) } None => { table.name == table_name || table.alias_name == Some(table_name.to_string()) } }) .map(|table| table.index) }
Sorry, something went wrong.
b41sh
Successfully merging a pull request may close this issue.
Search before asking
Version
main
What's Wrong?
How to Reproduce?
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: