You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/05/10 15:14:49 UTC
[GitHub] [hudi] nsivabalan commented on a change in pull request #2932: [WIP] Fixing schema evolution in sparksql_writer and deltastreamer
nsivabalan commented on a change in pull request #2932:
URL: https://github.com/apache/hudi/pull/2932#discussion_r629447410
##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java
##########
@@ -374,11 +375,12 @@ public void refreshTimeline() throws IOException {
transformed
.map(r -> (SchemaProvider) new DelegatingSchemaProvider(props, jssc,
dataAndCheckpoint.getSchemaProvider(),
- UtilHelpers.createRowBasedSchemaProvider(r.schema(), props, jssc)))
+ UtilHelpers.createLatestSchemaProvider(r.schema(), jssc, fs, cfg.targetBasePath)))
.orElse(dataAndCheckpoint.getSchemaProvider());
avroRDDOptional = transformed
.map(t -> HoodieSparkUtils.createRdd(
- t, HOODIE_RECORD_STRUCT_NAME, HOODIE_RECORD_NAMESPACE).toJavaRDD());
+ t, schemaProvider.getTargetSchema(), HOODIE_RECORD_STRUCT_NAME, HOODIE_RECORD_NAMESPACE).toJavaRDD());
Review comment:
existing HoodieSparkUtils.createRdd() won't work if schema is evolved schema compared to record's schema.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org