Copilot commented on code in PR #58923:
URL: https://github.com/apache/doris/pull/58923#discussion_r2608845985


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -3710,7 +3710,7 @@ private static void addOlapTablePropertyInfo(OlapTable 
olapTable, StringBuilder
         sb.append(olapTable.getInvertedIndexFileStorageFormat()).append("\"");
 
         // compression type
-        if (olapTable.getCompressionType() != TCompressionType.LZ4F) {
+        if (olapTable.getCompressionType() != 
TCompressionType.valueOf(Config.default_compression_type)) {

Review Comment:
   The code now uses 
`TCompressionType.valueOf(Config.default_compression_type)` which can throw 
`IllegalArgumentException` at runtime if `Config.default_compression_type` 
contains an invalid value. The original hardcoded comparison with 
`TCompressionType.LZ4F` was safe. Consider adding error handling or using a 
safer method like the existing `PropertyAnalyzer.stringToCompressionType()` 
method which already handles this conversion with proper validation.
   ```suggestion
           if (olapTable.getCompressionType() != 
PropertyAnalyzer.stringToCompressionType(Config.default_compression_type)) {
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to