cshuo commented on code in PR #19307:
URL: https://github.com/apache/hudi/pull/19307#discussion_r3627134423
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java:
##########
@@ -328,14 +328,17 @@ public static HoodieTableMetaClient initTableIfNotExists(
Configuration conf,
org.apache.hadoop.conf.Configuration hadoopConf) throws IOException {
final String basePath = conf.get(FlinkOptions.PATH);
- if (!tableExists(basePath, hadoopConf)) {
+ final boolean tableExists = tableExists(basePath, hadoopConf);
Review Comment:
remove local variable.
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java:
##########
@@ -218,10 +219,9 @@ private void initRecordKeySort() {
String[] recordKeyFields = OptionsResolver.getRecordKeys(config);
ValidationUtils.checkArgument(recordKeyFields.length > 0,
"Record key fields can't be empty for LSM storage layout stream
write.");
- SortOperatorGen sortOperatorGen = new SortOperatorGen(rowType,
recordKeyFields);
- this.recordKeyComputer =
sortOperatorGen.generateNormalizedKeyComputer("LsmRecordKeySortComputer");
- this.recordKeyComparator =
sortOperatorGen.generateRecordComparator("LsmRecordKeySortComparator");
- log.info("LSM storage layout stream write will sort buffered RowData by
record keys: {}",
+ this.recordKeyComputer = new RecordKeySortKeyComputer();
Review Comment:
use codegen computer/comparator for single string record key.
--
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]