danny0405 commented on code in PR #13240:
URL: https://github.com/apache/hudi/pull/13240#discussion_r2070980797


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/util/RowDataAvroQueryContexts.java:
##########
@@ -38,17 +40,19 @@
  * Maintains auxiliary utilities for row data fields handling.
  */
 public class RowDataAvroQueryContexts {
-  private static final Map<Schema, RowDataQueryContext> QUERY_CONTEXT_MAP = 
new ConcurrentHashMap<>();
+  private static final Map<Pair<Schema, Boolean>, RowDataQueryContext> 
QUERY_CONTEXT_MAP = new ConcurrentHashMap<>();
 
   // BinaryRowWriter in RowDataSerializer are reused, and it's not thread-safe.
   private static final ThreadLocal<Map<Schema, RowDataSerializer>> 
ROWDATA_SERIALIZER_CACHE = ThreadLocal.withInitial(HashMap::new);
 
+  private static final Map<Triple<Schema, Schema, Map<String, String>>, 
RowProjection> ROW_PROJECTION_CACHE = new ConcurrentHashMap<>();
+
   public static RowDataQueryContext fromAvroSchema(Schema avroSchema) {
     return fromAvroSchema(avroSchema, true);
   }
 
   public static RowDataQueryContext fromAvroSchema(Schema avroSchema, boolean 
utcTimezone) {
-    return QUERY_CONTEXT_MAP.computeIfAbsent(avroSchema, k -> {
+    return QUERY_CONTEXT_MAP.computeIfAbsent(Pair.of(avroSchema, utcTimezone), 
k -> {

Review Comment:
   I guess the `utcTimezone` should always be the same either for the write or 
read path?



-- 
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]

Reply via email to