Carl-Zhou-CN commented on code in PR #6833:
URL: https://github.com/apache/seatunnel/pull/6833#discussion_r1607475440


##########
seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalogLoader.java:
##########
@@ -51,24 +50,35 @@ public class PaimonCatalogLoader implements Serializable {
     private static final String HDFS_IMPL_KEY = "fs.hdfs.impl";
 
     private String warehouse;
+    private PaimonCatalogEnum catalogType;
+    private String catalogUri;
 
     private PaimonHadoopConfiguration paimonHadoopConfiguration;
 
-    public PaimonCatalogLoader(PaimonSinkConfig paimonSinkConfig) {
-        this.warehouse = paimonSinkConfig.getWarehouse();
-        this.paimonHadoopConfiguration = 
PaimonSecurityContext.loadHadoopConfig(paimonSinkConfig);
+    public PaimonCatalogLoader(PaimonConfig paimonConfig) {
+        this.warehouse = paimonConfig.getWarehouse();
+        this.catalogType = paimonConfig.getCatalogType();
+        this.catalogUri = paimonConfig.getCatalogUri();
+        this.paimonHadoopConfiguration = 
PaimonSecurityContext.loadHadoopConfig(paimonConfig);
     }
 
     public Catalog loadCatalog() {
         // When using the seatunel engine, set the current class loader to 
prevent loading failures
         
Thread.currentThread().setContextClassLoader(PaimonCatalogLoader.class.getClassLoader());
         final Map<String, String> optionsMap = new HashMap<>(1);
-        optionsMap.put(WAREHOUSE.key(), warehouse);
-        final Options options = Options.fromMap(optionsMap);
+        optionsMap.put(CatalogOptions.WAREHOUSE.key(), warehouse);
         if (warehouse.startsWith(HDFS_PREFIX)) {
             checkConfiguration(paimonHadoopConfiguration, HDFS_DEF_FS_NAME);
             paimonHadoopConfiguration.set(HDFS_IMPL_KEY, HDFS_IMPL);
         }
+        if (PaimonCatalogEnum.HIVE.getType().equals(catalogType.getType())) {

Review Comment:
   ```suggestion
           if 
(PaimonCatalogEnum.HIVE.getType().equalsIgnoreCase(catalogType.getType())) {
   ```



-- 
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]

Reply via email to