@@ -690,7 +690,7 @@ mod tests_statistical {
690
690
use arrow:: datatypes:: { DataType , Field , Schema } ;
691
691
use datafusion_common:: { stats:: Precision , JoinType , ScalarValue } ;
692
692
use datafusion_physical_expr:: expressions:: Column ;
693
- use datafusion_physical_expr:: PhysicalExpr ;
693
+ use datafusion_physical_expr:: { PhysicalExpr , PhysicalExprRef } ;
694
694
695
695
/// Return statistcs for empty table
696
696
fn empty_statistics ( ) -> Statistics {
@@ -860,8 +860,10 @@ mod tests_statistical {
860
860
Arc :: clone ( & big) ,
861
861
Arc :: clone ( & small) ,
862
862
vec ! [ (
863
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
864
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
863
+ Arc :: new( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) ,
864
+ Arc :: new(
865
+ Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
866
+ ) ,
865
867
) ] ,
866
868
None ,
867
869
& JoinType :: Left ,
@@ -914,8 +916,10 @@ mod tests_statistical {
914
916
Arc :: clone ( & small) ,
915
917
Arc :: clone ( & big) ,
916
918
vec ! [ (
917
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
918
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
919
+ Arc :: new(
920
+ Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
921
+ ) ,
922
+ Arc :: new( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) ,
919
923
) ] ,
920
924
None ,
921
925
& JoinType :: Left ,
@@ -970,8 +974,13 @@ mod tests_statistical {
970
974
Arc :: clone ( & big) ,
971
975
Arc :: clone ( & small) ,
972
976
vec ! [ (
973
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
974
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
977
+ Arc :: new(
978
+ Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
979
+ ) ,
980
+ Arc :: new(
981
+ Column :: new_with_schema( "small_col" , & small. schema( ) )
982
+ . unwrap( ) ,
983
+ ) ,
975
984
) ] ,
976
985
None ,
977
986
& join_type,
@@ -1040,8 +1049,8 @@ mod tests_statistical {
1040
1049
Arc :: clone ( & big) ,
1041
1050
Arc :: clone ( & small) ,
1042
1051
vec ! [ (
1043
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1044
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1052
+ Arc :: new ( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) ,
1053
+ Arc :: new ( Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ) ,
1045
1054
) ] ,
1046
1055
None ,
1047
1056
& JoinType :: Inner ,
@@ -1056,8 +1065,10 @@ mod tests_statistical {
1056
1065
Arc :: clone ( & medium) ,
1057
1066
Arc :: new ( child_join) ,
1058
1067
vec ! [ (
1059
- Column :: new_with_schema( "medium_col" , & medium. schema( ) ) . unwrap( ) ,
1060
- Column :: new_with_schema( "small_col" , & child_schema) . unwrap( ) ,
1068
+ Arc :: new(
1069
+ Column :: new_with_schema( "medium_col" , & medium. schema( ) ) . unwrap( ) ,
1070
+ ) ,
1071
+ Arc :: new( Column :: new_with_schema( "small_col" , & child_schema) . unwrap( ) ) ,
1061
1072
) ] ,
1062
1073
None ,
1063
1074
& JoinType :: Left ,
@@ -1094,8 +1105,10 @@ mod tests_statistical {
1094
1105
Arc :: clone ( & small) ,
1095
1106
Arc :: clone ( & big) ,
1096
1107
vec ! [ (
1097
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1098
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1108
+ Arc :: new(
1109
+ Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1110
+ ) ,
1111
+ Arc :: new( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) ,
1099
1112
) ] ,
1100
1113
None ,
1101
1114
& JoinType :: Inner ,
@@ -1178,8 +1191,8 @@ mod tests_statistical {
1178
1191
) ) ;
1179
1192
1180
1193
let join_on = vec ! [ (
1181
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1182
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1194
+ Arc :: new ( Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ) as _ ,
1195
+ Arc :: new ( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _ ,
1183
1196
) ] ;
1184
1197
check_join_partition_mode (
1185
1198
small. clone ( ) ,
@@ -1190,8 +1203,8 @@ mod tests_statistical {
1190
1203
) ;
1191
1204
1192
1205
let join_on = vec ! [ (
1193
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1194
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1206
+ Arc :: new ( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _ ,
1207
+ Arc :: new ( Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ) as _ ,
1195
1208
) ] ;
1196
1209
check_join_partition_mode (
1197
1210
big. clone ( ) ,
@@ -1202,8 +1215,8 @@ mod tests_statistical {
1202
1215
) ;
1203
1216
1204
1217
let join_on = vec ! [ (
1205
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1206
- Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ,
1218
+ Arc :: new ( Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ) as _ ,
1219
+ Arc :: new ( Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ) as _ ,
1207
1220
) ] ;
1208
1221
check_join_partition_mode (
1209
1222
small. clone ( ) ,
@@ -1214,8 +1227,8 @@ mod tests_statistical {
1214
1227
) ;
1215
1228
1216
1229
let join_on = vec ! [ (
1217
- Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ,
1218
- Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ,
1230
+ Arc :: new ( Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ) as _ ,
1231
+ Arc :: new ( Column :: new_with_schema( "small_col" , & small. schema( ) ) . unwrap( ) ) as _ ,
1219
1232
) ] ;
1220
1233
check_join_partition_mode (
1221
1234
empty. clone ( ) ,
@@ -1244,8 +1257,9 @@ mod tests_statistical {
1244
1257
) ) ;
1245
1258
1246
1259
let join_on = vec ! [ (
1247
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1248
- Column :: new_with_schema( "bigger_col" , & bigger. schema( ) ) . unwrap( ) ,
1260
+ Arc :: new( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _,
1261
+ Arc :: new( Column :: new_with_schema( "bigger_col" , & bigger. schema( ) ) . unwrap( ) )
1262
+ as _,
1249
1263
) ] ;
1250
1264
check_join_partition_mode (
1251
1265
big. clone ( ) ,
@@ -1256,8 +1270,9 @@ mod tests_statistical {
1256
1270
) ;
1257
1271
1258
1272
let join_on = vec ! [ (
1259
- Column :: new_with_schema( "bigger_col" , & bigger. schema( ) ) . unwrap( ) ,
1260
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1273
+ Arc :: new( Column :: new_with_schema( "bigger_col" , & bigger. schema( ) ) . unwrap( ) )
1274
+ as _,
1275
+ Arc :: new( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _,
1261
1276
) ] ;
1262
1277
check_join_partition_mode (
1263
1278
bigger. clone ( ) ,
@@ -1268,8 +1283,8 @@ mod tests_statistical {
1268
1283
) ;
1269
1284
1270
1285
let join_on = vec ! [ (
1271
- Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ,
1272
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1286
+ Arc :: new ( Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ) as _ ,
1287
+ Arc :: new ( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _ ,
1273
1288
) ] ;
1274
1289
check_join_partition_mode (
1275
1290
empty. clone ( ) ,
@@ -1280,16 +1295,16 @@ mod tests_statistical {
1280
1295
) ;
1281
1296
1282
1297
let join_on = vec ! [ (
1283
- Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ,
1284
- Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ,
1298
+ Arc :: new ( Column :: new_with_schema( "big_col" , & big. schema( ) ) . unwrap( ) ) as _ ,
1299
+ Arc :: new ( Column :: new_with_schema( "empty_col" , & empty. schema( ) ) . unwrap( ) ) as _ ,
1285
1300
) ] ;
1286
1301
check_join_partition_mode ( big, empty, join_on, false , PartitionMode :: Partitioned ) ;
1287
1302
}
1288
1303
1289
1304
fn check_join_partition_mode (
1290
1305
left : Arc < StatisticsExec > ,
1291
1306
right : Arc < StatisticsExec > ,
1292
- on : Vec < ( Column , Column ) > ,
1307
+ on : Vec < ( PhysicalExprRef , PhysicalExprRef ) > ,
1293
1308
is_swapped : bool ,
1294
1309
expected_mode : PartitionMode ,
1295
1310
) {
@@ -1748,8 +1763,8 @@ mod hash_join_tests {
1748
1763
Arc :: clone ( & left_exec) ,
1749
1764
Arc :: clone ( & right_exec) ,
1750
1765
vec ! [ (
1751
- Column :: new_with_schema( "a" , & left_exec. schema( ) ) ?,
1752
- Column :: new_with_schema( "b" , & right_exec. schema( ) ) ?,
1766
+ Arc :: new ( Column :: new_with_schema( "a" , & left_exec. schema( ) ) ?) ,
1767
+ Arc :: new ( Column :: new_with_schema( "b" , & right_exec. schema( ) ) ?) ,
1753
1768
) ] ,
1754
1769
None ,
1755
1770
& t. initial_join_type ,
0 commit comments