EricJoy2048 commented on code in PR #5983:
URL: https://github.com/apache/seatunnel/pull/5983#discussion_r1567049665
##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/sink/HiveSink.java:
##########
@@ -207,4 +71,21 @@ public void prepare(Config pluginConfig) throws
PrepareFailException {
return Optional.of(
new HiveSinkAggregatedCommitter(pluginConfig, dbName,
tableName, hadoopConf));
}
+
+ @Override
+ public Optional<SaveModeHandler> getSaveModeHandler() {
+ if (pluginConfig.hasPath(SCHEMA_SAVE_MODE.key())
+ || pluginConfig.hasPath(DATA_SAVE_MODE.key())) {
+ ReadonlyConfig readonlyConfig =
ReadonlyConfig.fromConfig(pluginConfig);
+ SchemaSaveMode schemaSaveMode =
readonlyConfig.get(SCHEMA_SAVE_MODE);
+ DataSaveMode dataSaveMode = readonlyConfig.get(DATA_SAVE_MODE);
+ String custom_sql = readonlyConfig.get(CUSTOM_SQL);
+ new ReadonlyConfigParser().parse(readonlyConfig);
+ HiveCatalog catalog = new HiveCatalog(pluginConfig);
+ return Optional.of(
+ new DefaultSaveModeHandler(
Review Comment:
When people use Hive to automatically create tables, they may need to
specify location, field delimiters, storage formats, etc. So I think Hive's
automatic table creation should mimic Doris by specifying a table creation
template for creation, and by modifying the template to specify table
properties when needed.
--
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]