@@ -417,9 +417,7 @@ impl Unparser<'_> {
417
417
Expr :: Placeholder ( p) => {
418
418
Ok ( ast:: Expr :: Value ( ast:: Value :: Placeholder ( p. id . to_string ( ) ) ) )
419
419
}
420
- Expr :: OuterReferenceColumn ( _, _) => {
421
- not_impl_err ! ( "Unsupported Expr conversion: {expr:?}" )
422
- }
420
+ Expr :: OuterReferenceColumn ( _, col) => self . col_to_sql ( col) ,
423
421
Expr :: Unnest ( _) => not_impl_err ! ( "Unsupported Expr conversion: {expr:?}" ) ,
424
422
}
425
423
}
@@ -874,9 +872,9 @@ mod tests {
874
872
use datafusion_expr:: {
875
873
case, col, exists,
876
874
expr:: { AggregateFunction , AggregateFunctionDefinition } ,
877
- lit, not, not_exists, placeholder, table_scan, try_cast, when, wildcard ,
878
- ColumnarValue , ScalarUDF , ScalarUDFImpl , Signature , Volatility , WindowFrame ,
879
- WindowFunctionDefinition ,
875
+ lit, not, not_exists, out_ref_col , placeholder, table_scan, try_cast, when,
876
+ wildcard , ColumnarValue , ScalarUDF , ScalarUDFImpl , Signature , Volatility ,
877
+ WindowFrame , WindowFunctionDefinition ,
880
878
} ;
881
879
882
880
use crate :: unparser:: dialect:: CustomDialect ;
@@ -1161,6 +1159,10 @@ mod tests {
1161
1159
r#"TRY_CAST("a" AS INTEGER UNSIGNED)"# ,
1162
1160
) ,
1163
1161
( col( "x" ) . eq( placeholder( "$1" ) ) , r#"("x" = $1)"# ) ,
1162
+ (
1163
+ out_ref_col( DataType :: Int32 , "t.a" ) . gt( lit( 1 ) ) ,
1164
+ r#"("t"."a" > 1)"# ,
1165
+ ) ,
1164
1166
] ;
1165
1167
1166
1168
for ( expr, expected) in tests {
0 commit comments