frankgh commented on a change in pull request #4538:
URL: https://github.com/apache/nifi/pull/4538#discussion_r492320381



##########
File path: 
nifi-nar-bundles/nifi-parquet-bundle/nifi-parquet-processors/src/main/java/org/apache/nifi/parquet/utils/ParquetUtils.java
##########
@@ -168,9 +168,11 @@ public static ParquetConfig createParquetConfig(final 
PropertyContext context, f
         final ParquetFileWriter.Mode mode = overwrite ? 
ParquetFileWriter.Mode.OVERWRITE : ParquetFileWriter.Mode.CREATE;
         parquetConfig.setWriterMode(mode);
 
-        final String compressionTypeValue = 
context.getProperty(ParquetUtils.COMPRESSION_TYPE).getValue();
-        final CompressionCodecName codecName = 
CompressionCodecName.valueOf(compressionTypeValue);
-        parquetConfig.setCompressionCodec(codecName);
+        if(context.getProperty(ParquetUtils.COMPRESSION_TYPE).isSet()) {
+            final String compressionTypeValue = 
context.getProperty(ParquetUtils.COMPRESSION_TYPE).getValue();
+            final CompressionCodecName codecName = 
CompressionCodecName.valueOf(compressionTypeValue);
+            parquetConfig.setCompressionCodec(codecName);
+        }

Review comment:
       PR #4537 aimed to allow previous functionality to work as it did in 
previous versions of NiFi. However, the resolution order changed to also 
address NIFI-7635. In that PR, the `resolvedValue` was determined in this order:
   - configuredValue
   - default value from the ComponentNode
   - default value from the PropertyDescriptor
   
   Whereas in earlier versions of NiFi (pre 1.12.0), the resolution was done in 
this order:
   - configuredValue
   - default value from the PropertyDescriptor
   - default value from the ComponentNode




----------------------------------------------------------------
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:
[email protected]


Reply via email to