nsivabalan commented on code in PR #12310:
URL: https://github.com/apache/hudi/pull/12310#discussion_r1859452616
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1166,22 +1166,31 @@ public static HoodieData<HoodieRecord>
convertMetadataToColumnStatsRecords(Hoodi
public static final String[] META_COLS_TO_ALWAYS_INDEX =
{COMMIT_TIME_METADATA_FIELD, RECORD_KEY_METADATA_FIELD,
PARTITION_PATH_METADATA_FIELD};
public static final Set<String> META_COL_SET_TO_INDEX = new
HashSet<>(Arrays.asList(META_COLS_TO_ALWAYS_INDEX));
+ public static List<String> getColumnsToIndex(HoodieTableConfig tableConfig,
+ HoodieMetadataConfig
metadataConfig,
+ List<String> columnNames,
+ boolean overrideEnableCheck) {
+ return getColumnsToIndex(tableConfig, metadataConfig,
Either.left(columnNames), overrideEnableCheck);
+
+ }
+
public static List<String> getColumnsToIndex(HoodieTableConfig tableConfig,
HoodieMetadataConfig
metadataConfig,
List<String> columnNames) {
- return getColumnsToIndex(tableConfig, metadataConfig,
Either.left(columnNames));
+ return getColumnsToIndex(tableConfig, metadataConfig, columnNames, false);
}
public static List<String> getColumnsToIndex(HoodieTableConfig tableConfig,
HoodieMetadataConfig
metadataConfig,
Lazy<Option<Schema>>
tableSchema) {
- return getColumnsToIndex(tableConfig, metadataConfig,
Either.right(tableSchema));
+ return getColumnsToIndex(tableConfig, metadataConfig,
Either.right(tableSchema), false);
}
private static List<String> getColumnsToIndex(HoodieTableConfig tableConfig,
HoodieMetadataConfig
metadataConfig,
- Either<List<String>,
Lazy<Option<Schema>>> tableSchema) {
- checkState(metadataConfig.isColumnStatsIndexEnabled());
+ Either<List<String>,
Lazy<Option<Schema>>> tableSchema,
+ boolean overrideEnableCheck) {
+ checkState(overrideEnableCheck ||
metadataConfig.isColumnStatsIndexEnabled());
Review Comment:
what this overrideEnableCheck ?
we can't have any code in source code just for the purpose testing and not
being used in any other production code paths.
--
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]