nsivabalan commented on a change in pull request #3247:
URL: https://github.com/apache/hudi/pull/3247#discussion_r671383496
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/SimpleKeyGenerator.java
##########
@@ -72,4 +75,16 @@ public String getPartitionPath(Row row) {
return RowKeyGeneratorHelper.getPartitionPathFromRow(row,
getPartitionPathFields(),
hiveStylePartitioning, partitionPathPositions);
}
+
+ @Override
+ public String getPartitionPath(InternalRow row, StructType structType) {
+ buildFieldDataTypesMapIfNeeded(structType);
Review comment:
During instantiation of KeyGen, we never know if we are ever going to
invoke these methods. As you might be aware, these are invoked only in row
writer path and only if meta cols are disabled. So, as of now, our constructors
for keyGen are are designed in such a way. So, may be we can add public methods
to set the structType and expect callers to set it appropriately before calling
these methods.
I took precendence from what we did when we added support for
getPartitionPath(Row).
Let me know how you wanna go about it.
--
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]