jackjlli commented on code in PR #9424:
URL: https://github.com/apache/pinot/pull/9424#discussion_r974672289
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/converter/RealtimeSegmentConverter.java:
##########
@@ -49,34 +49,26 @@ public class RealtimeSegmentConverter {
private final String _segmentName;
private final String _sortedColumn;
private final List<String> _invertedIndexColumns;
- private final List<String> _textIndexColumns;
- private final List<String> _fstIndexColumns;
- private final List<String> _noDictionaryColumns;
- private final List<String> _varLengthDictionaryColumns;
+ private final ColumnDescriptionsContainer _columnDescriptionsContainer;
private final boolean _nullHandlingEnabled;
public RealtimeSegmentConverter(MutableSegmentImpl realtimeSegment,
SegmentZKPropsConfig segmentZKPropsConfig,
String outputPath, Schema schema, String tableName, TableConfig
tableConfig, String segmentName,
- String sortedColumn, List<String> invertedIndexColumns, List<String>
textIndexColumns,
- List<String> fstIndexColumns, List<String> noDictionaryColumns,
List<String> varLengthDictionaryColumns,
- boolean nullHandlingEnabled) {
+ ColumnDescriptionsContainer cdc, boolean nullHandlingEnabled) {
_realtimeSegmentImpl = realtimeSegment;
_segmentZKPropsConfig = segmentZKPropsConfig;
_outputPath = outputPath;
- _invertedIndexColumns = new ArrayList<>(invertedIndexColumns);
- if (sortedColumn != null) {
- _invertedIndexColumns.remove(sortedColumn);
+ _columnDescriptionsContainer = cdc;
+ _invertedIndexColumns = new
ArrayList<>(_columnDescriptionsContainer.getInvertedIndexColumns());
+ if (cdc.getSortedColumn() != null) {
+ _invertedIndexColumns.remove(cdc.getSortedColumn());
}
_dataSchema = getUpdatedSchema(schema);
- _sortedColumn = sortedColumn;
+ _sortedColumn = cdc.getSortedColumn();
_tableName = tableName;
_tableConfig = tableConfig;
_segmentName = segmentName;
- _noDictionaryColumns = noDictionaryColumns;
Review Comment:
I think we should consider either adding an instance level variable just for
columnDescriptionsContainer object, or assigning all the necessary indices into
instance variables, instead of keeping both here. Otherwise, it's a bit harder
to maintain in the future.
--
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]