github-advanced-security[bot] commented on code in PR #16132: URL: https://github.com/apache/druid/pull/16132#discussion_r1526091763
########## processing/src/main/java/org/apache/druid/segment/data/VSizeColumnarInts.java: ########## @@ -34,7 +35,7 @@ /** */ -public class VSizeColumnarInts implements ColumnarInts, Comparable<VSizeColumnarInts>, WritableSupplier<ColumnarInts> +public class VSizeColumnarInts implements ColumnarInts, Comparable<VSizeColumnarInts>, WritableSupplier<ColumnarInts>, ColumnPartSupplier<ColumnarInts> Review Comment: ## Inconsistent compareTo This class declares [compareTo](1) but inherits equals; the two could be inconsistent. [Show more details](https://github.com/apache/druid/security/code-scanning/2865) ########## processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplier.java: ########## @@ -220,6 +235,51 @@ this.simpleType = simpleType; } + @Override + public Map<String, ColumnPartSize> getComponents() + { + LinkedHashMap<String, ColumnPartSize> fieldsParts = new LinkedHashMap<>(); + try (NestedDataColumnV5 column = (NestedDataColumnV5) get()) { + for (String field : fields) { + ColumnHolder subHolder = column.getColumnHolder(NestedPathFinder.parseJsonPath(field)); + fieldsParts.put( + field, + new ColumnPartSize("nestedColumn", 0, subHolder.getColumnSize().getComponents()) + ); + } + } + return ImmutableMap.of( + "fieldsList", fields.getColumnPartSize(), + ColumnSize.DATA_SECTION, compressedRawColumnSupplier.getColumnPartSize(), + ColumnSize.STRING_VALUE_DICTIONARY_COLUMN_PART, stringDictionarySupplier.getColumnPartSize(), + ColumnSize.LONG_VALUE_DICTIONARY_COLUMN_PART, longDictionarySupplier.getColumnPartSize(), + ColumnSize.DOUBLE_VALUE_DICTIONARY_COLUMN_PART, doubleDictionarySupplier.getColumnPartSize(), + ColumnSize.ARRAY_VALUE_DICTIONARY_COLUMN_PART, arrayDictionarySupplier.getColumnPartSize(), + "nestedColumns", new ColumnPartSize("nestedColumns", 0, fieldsParts) + ); + } + + @Override + public Map<String, ColumnPartSize> getIndexComponents() + { + LinkedHashMap<String, ColumnPartSize> fieldsIndexes = new LinkedHashMap<>(); Review Comment: ## Container contents are never accessed The contents of this container are never accessed. [Show more details](https://github.com/apache/druid/security/code-scanning/7140) -- 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]
