Skip to content

Commit

Permalink
SpotlessApply and rebase on latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
dramaticlly committed Jan 24, 2025
1 parent 13d3802 commit c41b9a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import java.util.List;
import java.util.Map;
import org.apache.iceberg.HasTableOperations;
import org.apache.iceberg.Table;
import org.apache.iceberg.TableUtil;
import org.apache.iceberg.spark.Spark3Util;
import org.apache.spark.sql.catalyst.analysis.NoSuchTableException;
import org.apache.spark.sql.catalyst.parser.ParseException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import java.util.List;
import java.util.Map;
import org.apache.iceberg.HasTableOperations;
import org.apache.iceberg.Table;
import org.apache.iceberg.TableUtil;
import org.apache.iceberg.spark.Spark3Util;
import org.apache.spark.sql.catalyst.analysis.NoSuchTableException;
import org.apache.spark.sql.catalyst.parser.ParseException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.iceberg.HasTableOperations;
import org.apache.iceberg.RewriteTablePathUtil;
import org.apache.iceberg.Table;
import org.apache.iceberg.TableUtil;
import org.apache.spark.sql.AnalysisException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -50,8 +51,7 @@ public void removeTables() {
public void testRewriteTablePathWithPositionalArgument() {
String location = targetTableDir.toFile().toURI().toString();
Table table = validationCatalog.loadTable(tableIdent);
String metadataJson =
(((HasTableOperations) table).operations()).current().metadataFileLocation();
String metadataJson = TableUtil.metadataFileLocation(table);

List<Object[]> result =
sql(
Expand All @@ -72,9 +72,7 @@ public void testRewriteTablePathWithPositionalArgument() {
@TestTemplate
public void testRewriteTablePathWithNamedArgument() {
Table table = validationCatalog.loadTable(tableIdent);
String v0Metadata =
RewriteTablePathUtil.fileName(
(((HasTableOperations) table).operations()).current().metadataFileLocation());
String v0Metadata = RewriteTablePathUtil.fileName(TableUtil.metadataFileLocation(table));
sql("INSERT INTO TABLE %s VALUES (1, 'a')", tableName);
String v1Metadata =
RewriteTablePathUtil.fileName(
Expand Down Expand Up @@ -132,9 +130,7 @@ public void testProcedureWithInvalidInput() {
.hasMessageContaining("Couldn't load table");

Table table = validationCatalog.loadTable(tableIdent);
String v0Metadata =
RewriteTablePathUtil.fileName(
(((HasTableOperations) table).operations()).current().metadataFileLocation());
String v0Metadata = RewriteTablePathUtil.fileName(TableUtil.metadataFileLocation(table));
assertThatThrownBy(
() ->
sql(
Expand Down

0 comments on commit c41b9a2

Please sign in to comment.