dramaticlly commented on code in PR #18458:
URL: https://github.com/apache/iceberg/pull/18458#discussion_r4319038208


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/BaseSparkTable.java:
##########
@@ -94,15 +94,6 @@ public String name() {
     return table.toString();
   }
 
-  /**
-   * @deprecated since 1.12.0, use {@link #columns()} instead
-   */
-  @Deprecated
-  @Override
-  public StructType schema() {
-    return sparkSchema();

Review Comment:
   sparkSchema() can be deprecated as well, together with field variable 
`lazySparkSchema` and further simplify the `columns()` method 



##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/BaseSparkTable.java:
##########
@@ -94,15 +94,6 @@ public String name() {
     return table.toString();
   }
 
-  /**
-   * @deprecated since 1.12.0, use {@link #columns()} instead
-   */
-  @Deprecated
-  @Override
-  public StructType schema() {
-    return sparkSchema();

Review Comment:
   Same changes can apply to SparkChangelogTable



##########
spark/v4.1/spark/src/jmh/java/org/apache/iceberg/spark/action/IcebergDataCompactionBenchmark.java:
##########
@@ -93,7 +95,12 @@ protected final void initTable() {
               Spark3Util.catalogAndIdentifier(spark(), 
"spark_catalog").catalog();
       catalog.dropTable(IDENT);
       catalog.createTable(
-          IDENT, SparkSchemaUtil.convert(schema), new Transform[0], 
Collections.emptyMap());
+          IDENT,
+          new TableInfo.Builder()
+              
.withColumns(CatalogV2Util.structTypeToV2Columns(SparkSchemaUtil.convert(schema)))
+              .withPartitions(new Transform[0])
+              .withProperties(Collections.emptyMap())

Review Comment:
   with builder pattern we no longer need empty partition is default to 
`Transform[0]` and same with properties



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to