tsreaper commented on code in PR #1371:
URL: https://github.com/apache/incubator-paimon/pull/1371#discussion_r1229275560
##########
paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/PaimonMetaHook.java:
##########
@@ -76,10 +77,12 @@ public void preCreateTable(Table table) throws
MetaException {
table.getSd().setInputFormat(PaimonInputFormat.class.getCanonicalName());
table.getSd().setOutputFormat(PaimonOutputFormat.class.getCanonicalName());
-
- String location = LocationKeyExtractor.getLocation(table);
+ String location = LocationKeyExtractor.getLocation(table, conf);
if (location == null) {
String warehouse =
conf.get(HiveConf.ConfVars.METASTOREWAREHOUSE.varname);
+ org.apache.hadoop.fs.Path hadoopPath =
+ getDnsPath(new org.apache.hadoop.fs.Path(warehouse), conf);
+ warehouse = hadoopPath.toUri().toString();
Identifier identifier = Identifier.create(table.getDbName(),
table.getTableName());
location = AbstractCatalog.dataTableLocation(warehouse,
identifier).toUri().toString();
table.getSd().setLocation(location);
Review Comment:
Why not merge these implementation into `LocationKeyExtractor.getLocation`?
--
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]