Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed Dec 17, 2024
1 parent 0661f92 commit 827cb70
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

import static org.apache.paimon.CoreOptions.TYPE;
import static org.apache.paimon.CoreOptions.createCommitUser;
import static org.apache.paimon.options.CatalogOptions.CASE_SENSITIVE;
import static org.apache.paimon.options.CatalogOptions.LOCK_ENABLED;
import static org.apache.paimon.options.CatalogOptions.LOCK_TYPE;
import static org.apache.paimon.utils.BranchManager.DEFAULT_MAIN_BRANCH;
Expand Down Expand Up @@ -114,6 +115,11 @@ public Optional<CatalogLockFactory> defaultLockFactory() {
return Optional.empty();
}

@Override
public boolean caseSensitive() {
return catalogOptions.get(CASE_SENSITIVE);
}

public Optional<CatalogLockContext> lockContext() {
return Optional.of(CatalogLockContext.fromOptions(catalogOptions));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import java.util.Map;
import java.util.concurrent.Callable;

import static org.apache.paimon.options.CatalogOptions.CASE_SENSITIVE;

/** A catalog implementation for {@link FileIO}. */
public class FileSystemCatalog extends AbstractCatalog {

Expand Down Expand Up @@ -156,9 +154,4 @@ public void close() throws Exception {}
public String warehouse() {
return warehouse.toString();
}

@Override
public boolean caseSensitive() {
return catalogOptions.get(CASE_SENSITIVE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
import static org.apache.paimon.hive.HiveCatalogOptions.IDENTIFIER;
import static org.apache.paimon.hive.HiveCatalogOptions.LOCATION_IN_PROPERTIES;
import static org.apache.paimon.hive.HiveTableUtils.convertToFormatTable;
import static org.apache.paimon.options.CatalogOptions.CASE_SENSITIVE;
import static org.apache.paimon.options.CatalogOptions.FORMAT_TABLE_ENABLED;
import static org.apache.paimon.options.CatalogOptions.SYNC_ALL_PROPERTIES;
import static org.apache.paimon.options.CatalogOptions.TABLE_TYPE;
Expand Down Expand Up @@ -871,11 +870,6 @@ private void alterTableToHms(Table table, Identifier identifier, TableSchema new
clients.execute(client -> HiveAlterTableUtils.alterTable(client, identifier, table));
}

@Override
public boolean caseSensitive() {
return catalogOptions.get(CASE_SENSITIVE);
}

@Override
protected boolean allowCustomTablePath() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public void setUp() throws Exception {
String jdoConnectionURL = "jdbc:derby:memory:" + UUID.randomUUID();
hiveConf.setVar(METASTORECONNECTURLKEY, jdoConnectionURL + ";create=true");
String metastoreClientClass = "org.apache.hadoop.hive.metastore.HiveMetaStoreClient";
catalog = new HiveCatalog(fileIO, hiveConf, metastoreClientClass, warehouse);
Options catalogOptions = new Options();
catalogOptions.set(CatalogOptions.CASE_SENSITIVE, false);
catalog =
new HiveCatalog(fileIO, hiveConf, metastoreClientClass, catalogOptions, warehouse);
}

@Test
Expand Down

0 comments on commit 827cb70

Please sign in to comment.