the-other-tim-brown commented on code in PR #17743:
URL: https://github.com/apache/hudi/pull/17743#discussion_r2652117316
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/bootstrap/HoodieSparkBootstrapSchemaProvider.java:
##########
@@ -52,14 +53,14 @@ public HoodieSparkBootstrapSchemaProvider(HoodieWriteConfig
writeConfig) {
}
@Override
- protected Schema getBootstrapSourceSchema(HoodieEngineContext context,
List<Pair<String, List<HoodieFileStatus>>> partitions) {
- Schema schema = partitions.stream().flatMap(p ->
p.getValue().stream()).map(fs -> {
+ protected HoodieSchema getBootstrapSourceSchema(HoodieEngineContext context,
List<Pair<String, List<HoodieFileStatus>>> partitions) {
+ HoodieSchema schema = partitions.stream().flatMap(p ->
p.getValue().stream()).map(fs -> {
Path filePath = HadoopFSUtils.toPath(fs.getPath());
String extension = FSUtils.getFileExtension(filePath.getName());
if (PARQUET.getFileExtension().equals(extension)) {
return getBootstrapSourceSchemaParquet(writeConfig, context,
filePath);
} else if (ORC.getFileExtension().equals(extension)) {
- return getBootstrapSourceSchemaOrc(writeConfig, context, filePath);
+ return
HoodieSchema.fromAvroSchema(getBootstrapSourceSchemaOrc(writeConfig, context,
filePath));
Review Comment:
Can you move this conversion down to `getBootstrapSourceSchemaOrc`? It will
make the changes smaller when updating that util to return a HoodieSchema
directly.
--
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]