abhishekrb19 commented on code in PR #18433:
URL: https://github.com/apache/druid/pull/18433#discussion_r2301919991
##########
processing/src/main/java/org/apache/druid/data/input/impl/RegexInputFormat.java:
##########
@@ -96,10 +96,6 @@ public InputEntityReader createReader(InputRowSchema
inputRowSchema, InputEntity
@Override
public long getWeightedSize(String path, long size)
{
- CompressionUtils.Format compressionFormat =
CompressionUtils.Format.fromFileName(path);
- if (CompressionUtils.Format.GZ == compressionFormat) {
- return size * CompressionUtils.COMPRESSED_TEXT_WEIGHT_FACTOR;
- }
- return size;
+ return size *
CompressionUtils.estimatedCompressionFactor(CompressionUtils.Format.fromFileName(path));
Review Comment:
Perhaps we can extend `CompressionUtils.estimatedCompressionFactor()` or add
a thin wrapper that accepts the `path` directly and returns the compression
factor - internally invoking `CompressionUtils.Format.fromFileName()`
--
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]