File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1033,6 +1033,7 @@ pub fn create_physical_expr(
1033
1033
let cursors = execution_props. outer_query_cursors . clone ( ) ;
1034
1034
let cursor = cursors
1035
1035
. iter ( )
1036
+ . rev ( )
1036
1037
. find ( |cur| cur. schema ( ) . field_with_name ( c. name . as_str ( ) ) . is_ok ( ) )
1037
1038
. ok_or_else ( || {
1038
1039
DataFusionError :: Execution ( format ! (
Original file line number Diff line number Diff line change @@ -104,20 +104,20 @@ async fn subquery_where_with_from() -> Result<()> {
104
104
}
105
105
106
106
// TODO: plans but does not execute
107
- #[ ignore]
108
107
#[ tokio:: test]
109
108
async fn subquery_select_and_where_no_from ( ) -> Result < ( ) > {
110
109
let ctx = SessionContext :: new ( ) ;
111
110
register_aggregate_simple_csv ( & ctx) . await ?;
112
111
113
- let sql = "SELECT c1, (SELECT c1 + 1) FROM aggregate_simple o WHERE (SELECT NOT c3) ORDER BY c1 LIMIT 2 " ;
112
+ let sql = "SELECT c1, (SELECT c1 + 1) FROM aggregate_simple o WHERE (SELECT NOT c3) ORDER BY c1 LIMIT 3 " ;
114
113
let actual = execute_to_batches ( & ctx, sql) . await ;
115
114
116
115
let expected = vec ! [
117
116
"+---------+------------------+" ,
118
117
"| c1 | c1 Plus Int64(1) |" ,
119
118
"+---------+------------------+" ,
120
119
"| 0.00002 | 1.00002 |" ,
120
+ "| 0.00002 | 1.00002 |" ,
121
121
"| 0.00004 | 1.00004 |" ,
122
122
"+---------+------------------+" ,
123
123
] ;
@@ -127,7 +127,6 @@ async fn subquery_select_and_where_no_from() -> Result<()> {
127
127
}
128
128
129
129
// TODO: plans but does not execute
130
- #[ ignore]
131
130
#[ tokio:: test]
132
131
async fn subquery_select_and_where_with_from ( ) -> Result < ( ) > {
133
132
let ctx = SessionContext :: new ( ) ;
You can’t perform that action at this time.
0 commit comments