You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2024/04/09 00:12:28 UTC
(pinot) 01/01: Add validation check for forward index disabled when enabling columnar segment creation
This is an automated email from the ASF dual-hosted git repository.
jlli pushed a commit to branch add-validation-check-for-forward-index-disabled-when-enabling-columnar-segment-creation
in repository https://gitbox.apache.org/repos/asf/pinot.git
commit 4c2fca142da5600de9a98d6583a28729c7c6aa21
Author: jlli_LinkedIn <jl...@linkedin.com>
AuthorDate: Mon Apr 8 17:12:08 2024 -0700
Add validation check for forward index disabled when enabling columnar segment creation
---
.../org/apache/pinot/segment/local/utils/TableConfigUtils.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
index 8d31f5d399..fc50b56aa9 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
@@ -1310,11 +1310,11 @@ public final class TableConfigUtils {
if (indexingConfig.getRangeIndexColumns() != null && indexingConfig.getRangeIndexColumns().contains(columnName)) {
Preconditions.checkState(fieldSpec.isSingleValueField(), String.format("Feature not supported for multi-value "
+ "columns with range index. Cannot disable forward index for column %s. Disable range index on this "
- + "column to use this feature", columnName));
+ + "column to use this feature.", columnName));
Preconditions.checkState(indexingConfig.getRangeIndexVersion() == BitSlicedRangeIndexCreator.VERSION,
String.format("Feature not supported for single-value columns with range index version < 2. Cannot disable "
+ "forward index for column %s. Either disable range index or create range index with"
- + " version >= 2 to use this feature", columnName));
+ + " version >= 2 to use this feature.", columnName));
}
Preconditions.checkState(!indexingConfig.isOptimizeDictionaryForMetrics() && !indexingConfig.isOptimizeDictionary(),
@@ -1334,6 +1334,12 @@ public final class TableConfigUtils {
columnName,
hasDictionary ? "enabled" : "disabled", hasInvertedIndex ? "enabled" : "disabled");
}
+
+ // For tables with columnMajorSegmentBuilderEnabled being true, the forward index should not be disabled.
+ Preconditions.checkState(!indexingConfig.isColumnMajorSegmentBuilderEnabled(), String.format(
+ "Columnar segment generation is enabled. Cannot disable forward index for column %s. Disable columnar segment"
+ + " generation to use this feature.",
+ columnName));
}
private static void sanitize(TableConfig tableConfig) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org