This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 7d6ce1c4a6c02a7a2e6965e34f3a96e0e9f6e09b Author: Ali Alsuliman <[email protected]> AuthorDate: Wed Mar 5 19:15:23 2025 -0800 [ASTERIXDB-3536][COMP] Pass heterogeneous index flag when validating fields types - user model changes: no - storage format changes: no - interface changes: no Ext-ref: MB-27845 Change-Id: Icab29b7c2c530f7e2a0ac01ca923d1cf92bed008 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19492 Integration-Tests: Jenkins <[email protected]> Reviewed-by: Ali Alsuliman <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> Tested-by: Jenkins <[email protected]> (cherry picked from commit 249e0baad2e9c9a0fb94095e8f090541f72d74da) Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19563 --- .../main/java/org/apache/asterix/app/translator/QueryTranslator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java index ff29efd46a..297576d3c5 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java @@ -1561,7 +1561,8 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen throw new CompilationException(ErrorCode.COMPILATION_ERROR, indexedElement.getSourceLocation(), "Cannot specify exclude/include unknown for untyped keys in the index definition."); } - validateIndexFieldType(indexType, fieldTypePrime, projectPath, indexedElement.getSourceLocation()); + validateIndexFieldType(indexType, fieldTypePrime, projectPath, indexedElement.getSourceLocation(), + isHeterogeneousIndex); IAType fieldType = KeyFieldTypeUtil.makeUnknownableType(fieldTypePrime, fieldTypeNullable, fieldTypeMissable); @@ -1987,7 +1988,7 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen } protected void validateIndexFieldType(IndexType indexType, IAType fieldType, List<String> displayFieldName, - SourceLocation sourceLoc) throws AlgebricksException { + SourceLocation sourceLoc, boolean isHeterogeneousIndex) throws AlgebricksException { ValidateUtil.validateIndexFieldType(indexType, fieldType, displayFieldName, sourceLoc); }
