xiangfu0 commented on code in PR #18092:
URL: https://github.com/apache/pinot/pull/18092#discussion_r3036489934
##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/FieldConfig.java:
##########
@@ -197,11 +212,26 @@ public JsonNode getTierOverwrites() {
return _tierOverwrites;
}
+ /**
+ * @deprecated Use {@code codecPipeline} instead. This field is retained for
backward compatibility
+ * with existing table configs. When both {@code compressionCodec} and
{@code codecPipeline} are set,
+ * {@code codecPipeline} takes precedence.
+ */
+ @Deprecated
@Nullable
public CompressionCodec getCompressionCodec() {
return _compressionCodec;
Review Comment:
Fixed — updated the Javadoc to say: "Setting both `compressionCodec` and a
non-empty `codecPipeline` is rejected at construction time."
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/ForwardIndexConfig.java:
##########
@@ -162,8 +223,11 @@ public ForwardIndexConfig(@JsonProperty("disabled")
@Nullable Boolean disabled,
@JsonProperty("rawIndexWriterVersion") @Nullable Integer
rawIndexWriterVersion,
@JsonProperty("targetMaxChunkSize") @Nullable String targetMaxChunkSize,
@JsonProperty("targetDocsPerChunk") @Nullable Integer targetDocsPerChunk,
+ @JsonProperty("codecPipeline") @Nullable List<String> codecPipelineNames,
@JsonProperty("configs") @Nullable Map<String, Object> configs) {
this(disabled, getActualCompressionCodec(compressionCodec,
chunkCompressionType, dictIdCompressionType),
+ codecPipelineNames != null && !codecPipelineNames.isEmpty()
+ ? ChunkCodecPipeline.fromNames(codecPipelineNames) : null,
deriveNumDocsPerChunk, rawIndexWriterVersion, targetMaxChunkSize,
targetDocsPerChunk, configs);
Review Comment:
This is consistent with the `FieldConfig` behavior — empty list is treated
as "not set". The `@JsonCreator` converts `codecPipeline: []` to `null` so
downstream code has a single null-check pattern. An empty pipeline is not a
valid configuration (the `ChunkCodecPipeline` constructor rejects empty lists),
so treating it as absent is the correct behavior.
--
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]