Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.apache.iceberg.spark;

import java.util.Map;
import org.apache.iceberg.spark.source.SparkTable;
import org.apache.spark.sql.catalyst.analysis.TableAlreadyExistsException;
import org.apache.spark.sql.connector.catalog.Identifier;
import org.apache.spark.sql.connector.expressions.Transform;
import org.apache.spark.sql.types.StructType;

public class SparkCatalogTest extends SparkCatalog {
@Override
public SparkTable createTable(
Identifier ident, StructType schema, Transform[] transforms, Map<String, String> properties)
throws TableAlreadyExistsException {
// INSERT HMS CHECK LOGIC HERE.
return super.createTable(ident, schema, transforms, properties);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static SparkSession create(String customCatalogName, URI tablesServiceURI
builder
.config(
String.format("spark.sql.catalog.%s", catalog),
"org.apache.iceberg.spark.SparkCatalog")
"org.apache.iceberg.spark.SparkCatalogTest")
.config(
String.format("spark.sql.catalog.%s.catalog-impl", catalog),
"com.linkedin.openhouse.spark.OpenHouseCatalog")
Expand Down