@@ -425,23 +425,23 @@ mod tests {
425425 let eq_properties = EquivalenceProperties :: new ( schema) ;
426426
427427 // Case 1: Hash([a]) should NOT satisfy Hash([a, b])
428- let hash_a = Partitioning :: Hash ( vec ! [ col_a . clone( ) ] , 4 ) ;
428+ let hash_a = Partitioning :: Hash ( vec ! [ Arc :: clone( & col_a ) ] , 4 ) ;
429429 let required_ab =
430- Distribution :: HashPartitioned ( vec ! [ col_a . clone( ) , col_b . clone( ) ] ) ;
430+ Distribution :: HashPartitioned ( vec ! [ Arc :: clone( & col_a ) , Arc :: clone( & col_b ) ] ) ;
431431 assert ! (
432432 !hash_a. satisfy( & required_ab, & eq_properties) ,
433433 "Hash([a]) should NOT satisfy Hash([a,b]) - subset matching not safe for hash partitioning"
434434 ) ;
435435
436436 // Case 2: Hash([a]) SHOULD satisfy Hash([a])
437- let required_a = Distribution :: HashPartitioned ( vec ! [ col_a . clone( ) ] ) ;
437+ let required_a = Distribution :: HashPartitioned ( vec ! [ Arc :: clone( & col_a ) ] ) ;
438438 assert ! (
439439 hash_a. satisfy( & required_a, & eq_properties) ,
440440 "Hash([a]) should satisfy Hash([a]) - exact match"
441441 ) ;
442442
443443 // Case 3: Hash([a, b]) should satisfy Hash([a, b])
444- let hash_ab = Partitioning :: Hash ( vec ! [ col_a . clone( ) , col_b . clone( ) ] , 4 ) ;
444+ let hash_ab = Partitioning :: Hash ( vec ! [ Arc :: clone( & col_a ) , Arc :: clone( & col_b ) ] , 4 ) ;
445445 assert ! (
446446 hash_ab. satisfy( & required_ab, & eq_properties) ,
447447 "Hash([a,b]) should satisfy Hash([a,b]) - exact match"
@@ -454,26 +454,28 @@ mod tests {
454454 ) ;
455455
456456 // Case 5: SingleValuePartitioned([a]) should satisfy Hash([a, b])
457- let single_a = Partitioning :: SingleValuePartitioned ( vec ! [ col_a . clone( ) ] , 4 ) ;
457+ let single_a = Partitioning :: SingleValuePartitioned ( vec ! [ Arc :: clone( & col_a ) ] , 4 ) ;
458458 assert ! (
459459 single_a. satisfy( & required_ab, & eq_properties) ,
460460 "SingleValuePartitioned([a]) should satisfy Hash([a,b]) - subset matching is safe"
461461 ) ;
462462
463463 // Case 6: SingleValuePartitioned([a]) should satisfy Hash([a, b, c])
464464 let required_abc = Distribution :: HashPartitioned ( vec ! [
465- col_a . clone( ) ,
466- col_b . clone( ) ,
467- col_c . clone( ) ,
465+ Arc :: clone( & col_a ) ,
466+ Arc :: clone( & col_b ) ,
467+ Arc :: clone( & col_c ) ,
468468 ] ) ;
469469 assert ! (
470470 single_a. satisfy( & required_abc, & eq_properties) ,
471471 "SingleValuePartitioned([a]) should satisfy Hash([a,b,c])"
472472 ) ;
473473
474474 // Case 7: SingleValuePartitioned([a, b]) should satisfy Hash([a, b])
475- let single_ab =
476- Partitioning :: SingleValuePartitioned ( vec ! [ col_a. clone( ) , col_b. clone( ) ] , 4 ) ;
475+ let single_ab = Partitioning :: SingleValuePartitioned (
476+ vec ! [ Arc :: clone( & col_a) , Arc :: clone( & col_b) ] ,
477+ 4 ,
478+ ) ;
477479 assert ! (
478480 single_ab. satisfy( & required_ab, & eq_properties) ,
479481 "SingleValuePartitioned([a,b]) should satisfy Hash([a,b]) - exact match"
@@ -486,15 +488,17 @@ mod tests {
486488 ) ;
487489
488490 // Case 9: SingleValuePartitioned([a, c]) should satisfy Hash([a, b, c])
489- let single_ac =
490- Partitioning :: SingleValuePartitioned ( vec ! [ col_a. clone( ) , col_c. clone( ) ] , 4 ) ;
491+ let single_ac = Partitioning :: SingleValuePartitioned (
492+ vec ! [ Arc :: clone( & col_a) , Arc :: clone( & col_c) ] ,
493+ 4 ,
494+ ) ;
491495 assert ! (
492496 single_ac. satisfy( & required_abc, & eq_properties) ,
493497 "SingleValuePartitioned([a,c]) should satisfy Hash([a,b,c]) - subset match"
494498 ) ;
495499
496500 // Case 10: SingleValuePartitioned([a, c]) should NOT satisfy Hash([b])
497- let required_b = Distribution :: HashPartitioned ( vec ! [ col_b . clone( ) ] ) ;
501+ let required_b = Distribution :: HashPartitioned ( vec ! [ Arc :: clone( & col_b ) ] ) ;
498502 assert ! (
499503 !single_ac. satisfy( & required_b, & eq_properties) ,
500504 "SingleValuePartitioned([a,c]) should NOT satisfy Hash([b]) - no common columns"
0 commit comments