@@ -27,7 +27,7 @@ import org.apache.spark.sql.catalyst.TableIdentifier
2727import org .apache .spark .sql .catalyst .analysis .{CannotReplaceMissingTableException , TableAlreadyExistsException }
2828import org .apache .spark .sql .catalyst .plans .logical .{AppendData , LogicalPlan , OverwriteByExpression , OverwritePartitionsDynamic }
2929import org .apache .spark .sql .connector .InMemoryV1Provider
30- import org .apache .spark .sql .connector .catalog .{Column , Identifier , InMemoryTable , InMemoryTableCatalog , TableCatalog }
30+ import org .apache .spark .sql .connector .catalog .{Column => ColumnV2 , Identifier , InMemoryTable , InMemoryTableCatalog , TableCatalog }
3131import org .apache .spark .sql .connector .catalog .CatalogManager .SESSION_CATALOG_NAME
3232import org .apache .spark .sql .connector .expressions .{BucketTransform , ClusterByTransform , DaysTransform , FieldReference , HoursTransform , IdentityTransform , LiteralValue , MonthsTransform , YearsTransform }
3333import org .apache .spark .sql .execution .QueryExecution
@@ -410,7 +410,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
410410
411411 assert(table.name === " testcat.table_name" )
412412 assert(table.columns sameElements
413- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
413+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
414414 assert(table.partitioning.isEmpty)
415415 assert(table.properties == defaultOwnership.asJava)
416416 }
@@ -426,7 +426,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
426426
427427 assert(table.name === " testcat.table_name" )
428428 assert(table.columns sameElements
429- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
429+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
430430 assert(table.partitioning.isEmpty)
431431 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
432432 }
@@ -442,7 +442,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
442442
443443 assert(table.name === " testcat.table_name" )
444444 assert(table.columns sameElements
445- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
445+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
446446 assert(table.partitioning.isEmpty)
447447 assert(table.properties === (Map (" prop" -> " value" ) ++ defaultOwnership).asJava)
448448 }
@@ -458,7 +458,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
458458
459459 assert(table.name === " testcat.table_name" )
460460 assert(table.columns sameElements
461- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
461+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
462462 assert(table.partitioning === Seq (IdentityTransform (FieldReference (" id" ))))
463463 assert(table.properties == defaultOwnership.asJava)
464464 }
@@ -555,7 +555,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
555555 // table should not have been changed
556556 assert(table.name === " testcat.table_name" )
557557 assert(table.columns sameElements
558- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
558+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
559559 assert(table.partitioning === Seq (IdentityTransform (FieldReference (" id" ))))
560560 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
561561 }
@@ -592,7 +592,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
592592 // validate the initial table
593593 assert(table.name === " testcat.table_name" )
594594 assert(table.columns sameElements
595- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
595+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
596596 assert(table.partitioning === Seq (IdentityTransform (FieldReference (" id" ))))
597597 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
598598
@@ -609,9 +609,9 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
609609 // validate the replacement table
610610 assert(replaced.name === " testcat.table_name" )
611611 assert(replaced.columns sameElements Array (
612- Column .create(" id" , LongType ),
613- Column .create(" data" , StringType ),
614- Column .create(" even_or_odd" , StringType )))
612+ ColumnV2 .create(" id" , LongType ),
613+ ColumnV2 .create(" data" , StringType ),
614+ ColumnV2 .create(" even_or_odd" , StringType )))
615615 assert(replaced.partitioning.isEmpty)
616616 assert(replaced.properties === defaultOwnership.asJava)
617617 }
@@ -629,7 +629,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
629629 // validate the initial table
630630 assert(table.name === " testcat.table_name" )
631631 assert(table.columns sameElements
632- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
632+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
633633 assert(table.partitioning.isEmpty)
634634 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
635635
@@ -646,9 +646,9 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
646646 // validate the replacement table
647647 assert(replaced.name === " testcat.table_name" )
648648 assert(replaced.columns sameElements Array (
649- Column .create(" id" , LongType ),
650- Column .create(" data" , StringType ),
651- Column .create(" even_or_odd" , StringType )))
649+ ColumnV2 .create(" id" , LongType ),
650+ ColumnV2 .create(" data" , StringType ),
651+ ColumnV2 .create(" even_or_odd" , StringType )))
652652 assert(replaced.partitioning === Seq (IdentityTransform (FieldReference (" id" ))))
653653 assert(replaced.properties === defaultOwnership.asJava)
654654 }
@@ -666,7 +666,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
666666 // validate the initial table
667667 assert(table.name === " testcat.table_name" )
668668 assert(table.columns sameElements
669- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
669+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
670670 assert(table.partitioning.isEmpty)
671671 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
672672
@@ -683,9 +683,9 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
683683 // validate the replacement table
684684 assert(replaced.name === " testcat.table_name" )
685685 assert(replaced.columns sameElements
686- Array (Column .create(" id" , LongType ),
687- Column .create(" data" , StringType ),
688- Column .create(" even_or_odd" , StringType )))
686+ Array (ColumnV2 .create(" id" , LongType ),
687+ ColumnV2 .create(" data" , StringType ),
688+ ColumnV2 .create(" even_or_odd" , StringType )))
689689 assert(replaced.partitioning === Seq (ClusterByTransform (Seq (FieldReference (" id" )))))
690690 assert(replaced.properties === defaultOwnership.asJava)
691691 }
@@ -710,7 +710,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
710710 // validate the replacement table
711711 assert(replaced.name === " testcat.table_name" )
712712 assert(replaced.columns sameElements
713- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
713+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
714714 assert(replaced.partitioning.isEmpty)
715715 assert(replaced.properties === defaultOwnership.asJava)
716716 }
@@ -729,7 +729,7 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
729729 // validate the initial table
730730 assert(table.name === " testcat.table_name" )
731731 assert(table.columns sameElements
732- Array (Column .create(" id" , LongType ), Column .create(" data" , StringType )))
732+ Array (ColumnV2 .create(" id" , LongType ), ColumnV2 .create(" data" , StringType )))
733733 assert(table.partitioning === Seq (IdentityTransform (FieldReference (" id" ))))
734734 assert(table.properties === (Map (" provider" -> " foo" ) ++ defaultOwnership).asJava)
735735
@@ -746,9 +746,9 @@ class DataFrameWriterV2Suite extends QueryTest with SharedSparkSession with Befo
746746 // validate the replacement table
747747 assert(replaced.name === " testcat.table_name" )
748748 assert(replaced.columns sameElements Array (
749- Column .create(" id" , LongType ),
750- Column .create(" data" , StringType ),
751- Column .create(" even_or_odd" , StringType )))
749+ ColumnV2 .create(" id" , LongType ),
750+ ColumnV2 .create(" data" , StringType ),
751+ ColumnV2 .create(" even_or_odd" , StringType )))
752752 assert(replaced.partitioning.isEmpty)
753753 assert(replaced.properties === defaultOwnership.asJava)
754754 }
0 commit comments