This is an automated email from the ASF dual-hosted git repository.
wyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new a641846f63 [NO ISSUE] Stabelize SqlppExecutionColumnTest
a641846f63 is described below
commit a641846f6354ff6925754f57bf416c1924bed1f3
Author: Wail Alkowaileet <[email protected]>
AuthorDate: Tue Dec 12 09:17:33 2023 -0800
[NO ISSUE] Stabelize SqlppExecutionColumnTest
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Allow none correlated-prefix merge policies
when creating columnar datasets.
- Enable cast-default-null tests without
correlated-prefix merge policy
Change-Id: Ie9136d9e5de846f6c464ca3f527bc7e107d6b9c6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18009
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Wail Alkowaileet <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
---
.../asterix/test/runtime/SqlppExecutionColumnTest.java | 15 +++++++++++----
.../src/test/resources/runtimets/ignore_column.txt | 1 -
.../column/validation/ColumnPropertiesValidationUtil.java | 7 +++++--
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/SqlppExecutionColumnTest.java
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/SqlppExecutionColumnTest.java
index 1baedbe8ff..9c5f7b58bf 100644
---
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/SqlppExecutionColumnTest.java
+++
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/SqlppExecutionColumnTest.java
@@ -28,6 +28,7 @@ import org.apache.asterix.common.config.GlobalConfig;
import org.apache.asterix.test.base.AsterixTestHelper;
import org.apache.asterix.test.common.TestExecutor;
import org.apache.asterix.testframework.context.TestCaseContext;
+import org.apache.asterix.testframework.xml.TestCase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -62,10 +63,16 @@ public class SqlppExecutionColumnTest {
public static Collection<Object[]> tests() throws Exception {
IGNORED = new HashSet<>(AsterixTestHelper.readTestListFile(new
File(IGNORE_FILE)));
Collection<Object[]> tests = LangExecutionUtil.tests("only_sqlpp.xml",
"testsuite_sqlpp_column.xml");
- return tests.stream().filter(t -> {
- TestCaseContext ctx = (TestCaseContext) t[0];
- return !IGNORED_GROUPS.contains(ctx.getTestCase().getFilePath())
&& !IGNORED.contains(ctx.toString());
- }).collect(Collectors.toList());
+ return
tests.stream().filter(SqlppExecutionColumnTest::allow).collect(Collectors.toList());
+ }
+
+ private static boolean allow(Object[] test) {
+ TestCaseContext ctx = (TestCaseContext) test[0];
+ TestCase testCase = ctx.getTestCase();
+ boolean notIgnored = !IGNORED_GROUPS.contains(testCase.getFilePath())
&& !IGNORED.contains(ctx.toString());
+ boolean noCorrelatedPrefix =
testCase.getCompilationUnit().stream().noneMatch(cu ->
cu.getPlaceholder().stream()
+ .anyMatch(ph ->
ph.getValue().toLowerCase().contains("correlated-prefix")));
+ return notIgnored && noCorrelatedPrefix;
}
protected TestCaseContext tcCtx;
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/ignore_column.txt
b/asterixdb/asterix-app/src/test/resources/runtimets/ignore_column.txt
index 9d88127df0..34feb90a02 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/ignore_column.txt
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/ignore_column.txt
@@ -26,7 +26,6 @@ join: hash_join_record
distinct: record
##### Unsupported merge-policy (correlated-prefix) #####
-ddl: index-cast-null
dml: using-correlated-prefix-merge-policy
dml: using-correlated-prefix-merge-policy-with-feed
dml: scan-delete-btree-correlated-secondary-index-nullable
diff --git
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/validation/ColumnPropertiesValidationUtil.java
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/validation/ColumnPropertiesValidationUtil.java
index 3fe69077b8..dd70d96097 100644
---
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/validation/ColumnPropertiesValidationUtil.java
+++
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/validation/ColumnPropertiesValidationUtil.java
@@ -19,15 +19,18 @@
package org.apache.asterix.column.validation;
import java.util.List;
+import java.util.Set;
import org.apache.asterix.common.config.DatasetConfig;
+import org.apache.asterix.common.context.CorrelatedPrefixMergePolicyFactory;
import org.apache.asterix.common.exceptions.CompilationException;
import org.apache.asterix.common.exceptions.ErrorCode;
-import org.apache.asterix.common.utils.StorageConstants;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.exceptions.SourceLocation;
public class ColumnPropertiesValidationUtil {
+ private static final Set<String> UNSUPPORTED_MERGE_POLICIES =
Set.of(CorrelatedPrefixMergePolicyFactory.NAME);
+
private ColumnPropertiesValidationUtil() {
}
@@ -37,7 +40,7 @@ public class ColumnPropertiesValidationUtil {
return;
}
- if
(!StorageConstants.DEFAULT_COMPACTION_POLICY_NAME.equals(mergePolicy)) {
+ if (UNSUPPORTED_MERGE_POLICIES.contains(mergePolicy.toLowerCase())) {
throw
CompilationException.create(ErrorCode.UNSUPPORTED_COLUMN_MERGE_POLICY,
sourceLocation, mergePolicy);
}