deniskuzZ commented on code in PR #4346:
URL: https://github.com/apache/hive/pull/4346#discussion_r1226722241
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java:
##########
@@ -225,4 +231,34 @@ public static boolean isCtas(Properties properties) {
return
Boolean.parseBoolean(properties.getProperty(hive_metastoreConstants.TABLE_IS_CTAS));
}
+ protected static Properties getSerializationProps() {
+ Properties props = new Properties();
+ props.put(serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.tabCode);
+ props.put(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL");
+ return props;
+ }
+
+ protected static String getParseData(String parseData, String specId,
ObjectMapper mapper)
+ throws JsonProcessingException {
+ Map<String, String> map = mapper.readValue(parseData, Map.class);
+ String partString =
+ map.entrySet().stream().filter(entry -> entry.getValue() !=
null).map(java.lang.Object::toString)
+ .collect(Collectors.joining("/"));
+ return String.format("Spec-id=%s/%s", specId, partString);
+ }
+
+ protected static JobConf getPartJobConf(Configuration confs, Path path,
+ org.apache.hadoop.hive.ql.metadata.Table tbl) {
+ JobConf job = new JobConf(confs);
+ HiveConf.setVar(job, HiveConf.ConfVars.HIVE_MAPRED_INPUT_DIR,
path.toString());
+ HiveConf.setVar(job, HiveConf.ConfVars.HIVE_READ_COLUMN_NAMES_CONF_STR,
+ "partition,record_count,file_count," + "spec_id");
+ HiveConf.setVar(job, HiveConf.ConfVars.HIVE_ICEBERG_MR_TABLE_LOC,
tbl.getPath().toString());
+ HiveConf.setVar(job, HiveConf.ConfVars.HIVE_MAPRED_INPUT_DIR,
path.toString());
Review Comment:
why it's declared twice? line 253 and 257? same for HIVE_MAPRED_INPUT_DIR
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]