[
https://issues.apache.org/jira/browse/PARQUET-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751710#comment-17751710
]
ASF GitHub Bot commented on PARQUET-2336:
-----------------------------------------
rdblue commented on code in PR #1134:
URL: https://github.com/apache/parquet-mr/pull/1134#discussion_r1286029520
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java:
##########
@@ -234,11 +234,11 @@ protected CompressionCodec getCodec(CompressionCodecName
codecName) {
if (codecClassName == null) {
return null;
}
- CompressionCodec codec = CODEC_BY_NAME.get(codecClassName);
+ String codecCacheKey = this.cacheKey(codecName);
+ CompressionCodec codec = CODEC_BY_NAME.get(codecCacheKey);
Review Comment:
Since `CODEC_BY_NAME` is `protected`, I think this _could_ break something
that is relying on the cache, although I'm not sure why someone would access it
directly. Maybe that visibility is an accident?
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java:
##########
@@ -234,11 +234,11 @@ protected CompressionCodec getCodec(CompressionCodecName
codecName) {
if (codecClassName == null) {
return null;
}
- CompressionCodec codec = CODEC_BY_NAME.get(codecClassName);
+ String codecCacheKey = this.cacheKey(codecName);
+ CompressionCodec codec = CODEC_BY_NAME.get(codecCacheKey);
if (codec != null) {
return codec;
}
-
Review Comment:
Nit: unnecessary whitespace change.
> Add caching key to CodecFactory
> -------------------------------
>
> Key: PARQUET-2336
> URL: https://issues.apache.org/jira/browse/PARQUET-2336
> Project: Parquet
> Issue Type: Bug
> Components: parquet-hadoop
> Affects Versions: 1.13.1
> Reporter: Fokko Driesprong
> Assignee: Fokko Driesprong
> Priority: Major
> Fix For: 1.14.0
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)