the-other-tim-brown commented on code in PR #10342:
URL: https://github.com/apache/hudi/pull/10342#discussion_r1429453468
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -998,9 +996,9 @@ public void runMetaSync() {
* this constraint.
*/
private void setupWriteClient(Option<JavaRDD<HoodieRecord>> recordsOpt)
throws IOException {
- if ((null != schemaProvider)) {
+ if (null != schemaProvider) {
Schema sourceSchema = schemaProvider.getSourceSchema();
- Schema targetSchema = schemaProvider.getTargetSchema();
+ Schema targetSchema =
getSchemaForWriteConfig(schemaProvider.getTargetSchema());
Review Comment:
`getHoodieClientConfig` is also called from the constructor so you need to
consider that path too if you are looking simply at paths that can eventually
hit this `getSchemaForWriteConfig` method. I've updated the code so that there
is no repeated call anymore and the call from the constructor avoids a
potential schema lookup entirely.
--
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]