[NO ISSUE][TEST] Share CAST modifier tests
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Change-Id: If1371f2cd6229e9c3841148f2304e88e5419191d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14563
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
Reviewed-by: Michael Blow <mblow@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonLogicalPlanTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonLogicalPlanTest.java
index 28fca9c..65cbb9e 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonLogicalPlanTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonLogicalPlanTest.java
@@ -26,38 +26,22 @@
import java.io.PrintWriter;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
-import org.apache.asterix.api.common.AsterixHyracksIntegrationUtil;
import org.apache.asterix.api.java.AsterixJavaClient;
-import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
-import org.apache.asterix.common.config.GlobalConfig;
-import org.apache.asterix.common.context.IStorageComponentProvider;
import org.apache.asterix.common.dataflow.ICcApplicationContext;
import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
-import org.apache.asterix.external.util.ExternalDataConstants;
-import org.apache.asterix.external.util.IdentitiyResolverFactory;
-import org.apache.asterix.file.StorageComponentProvider;
import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.test.base.AsterixTestHelper;
-import org.apache.asterix.test.common.TestHelper;
-import org.apache.asterix.test.runtime.HDFSCluster;
+import org.apache.asterix.test.optimizer.AbstractOptimizerTest;
import org.apache.asterix.translator.ExecutionPlans;
-import org.apache.asterix.translator.IStatementExecutorFactory;
import org.apache.asterix.translator.SessionConfig.PlanFormat;
import org.apache.commons.io.FileUtils;
import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.junit.AfterClass;
-import org.junit.Assume;
-import org.junit.BeforeClass;
import org.junit.Test;
-import org.junit.internal.AssumptionViolatedException;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@@ -67,177 +51,82 @@
import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(Parameterized.class)
-public class JsonLogicalPlanTest {
+public class JsonLogicalPlanTest extends AbstractOptimizerTest {
- private static final Logger LOGGER = LogManager.getLogger();
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
static {
OBJECT_MAPPER.enable(DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY);
OBJECT_MAPPER.enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS);
}
- protected static final String SEPARATOR = File.separator;
- private static final String EXTENSION_SQLPP = "sqlpp";
- private static final String EXTENSION_RESULT = "plan.json";
- private static final String FILENAME_IGNORE = "ignore.txt";
- private static final String FILENAME_ONLY = "only.txt";
- private static final String PATH_BASE =
- "src" + SEPARATOR + "test" + SEPARATOR + "resources" + SEPARATOR + "optimizerts" + SEPARATOR;
- private static final String PATH_QUERIES = PATH_BASE + "queries" + SEPARATOR;
- protected static String PATH_ACTUAL = "target" + File.separator + "jplantest" + SEPARATOR;
protected static boolean optimized = false;
- private static final ArrayList<String> ignore = AsterixTestHelper.readTestListFile(FILENAME_IGNORE, PATH_BASE);
- private static final ArrayList<String> only = AsterixTestHelper.readTestListFile(FILENAME_ONLY, PATH_BASE);
- protected static final String TEST_CONFIG_FILE_NAME = "src/main/resources/cc.conf";
- private static final ILangCompilationProvider sqlppCompilationProvider = new SqlppCompilationProvider();
- protected static ILangCompilationProvider extensionLangCompilationProvider = null;
- protected static IStatementExecutorFactory statementExecutorFactory = new DefaultStatementExecutorFactory();
- protected static IStorageComponentProvider storageComponentProvider = new StorageComponentProvider();
-
- protected static AsterixHyracksIntegrationUtil integrationUtil = new AsterixHyracksIntegrationUtil();
-
- @BeforeClass
- public static void setUp() throws Exception {
- System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, TEST_CONFIG_FILE_NAME);
- final File outdir = new File(PATH_ACTUAL);
- outdir.mkdirs();
-
- HDFSCluster.getInstance().setup();
-
- integrationUtil.init(true, TEST_CONFIG_FILE_NAME);
- // Set the node resolver to be the identity resolver that expects node names
- // to be node controller ids; a valid assumption in test environment.
- System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY,
- IdentitiyResolverFactory.class.getName());
- }
-
- @AfterClass
- public static void tearDown() throws Exception {
- File outdir = new File(PATH_ACTUAL);
- File[] files = outdir.listFiles();
- if (files == null || files.length == 0) {
- outdir.delete();
- }
-
- HDFSCluster.getInstance().cleanup();
-
- integrationUtil.deinit(true);
- }
-
- private static void suiteBuildPerFile(File file, Collection<Object[]> testArgs, String path) {
- if (file.isDirectory() && !file.getName().startsWith(".")) {
- for (File innerfile : file.listFiles()) {
- String subdir = innerfile.isDirectory() ? path + innerfile.getName() + SEPARATOR : path;
- suiteBuildPerFile(innerfile, testArgs, subdir);
- }
- }
- if (file.isFile() && file.getName().endsWith(EXTENSION_SQLPP)) {
- String resultFileName = AsterixTestHelper.extToResExt(file.getName(), EXTENSION_RESULT);
- File actualFile = new File(PATH_ACTUAL + SEPARATOR + path + resultFileName);
- testArgs.add(new Object[] { file, actualFile });
- }
+ static {
+ EXTENSION_RESULT = "plan.json";
+ PATH_ACTUAL = "target" + File.separator + "jplantest" + SEPARATOR;
}
@Parameters(name = "JsonLogicalPlanTest {index}: {0}")
public static Collection<Object[]> tests() {
- Collection<Object[]> testArgs = new ArrayList<>();
- if (only.isEmpty()) {
- suiteBuildPerFile(new File(PATH_QUERIES), testArgs, "");
- } else {
- for (String path : only) {
- suiteBuildPerFile(new File(PATH_QUERIES + path), testArgs,
- path.lastIndexOf(SEPARATOR) < 0 ? "" : path.substring(0, path.lastIndexOf(SEPARATOR) + 1));
- }
- }
- return testArgs;
+ return AbstractOptimizerTest.tests();
}
- private final File actualFile;
- private final File queryFile;
-
- public JsonLogicalPlanTest(final File queryFile, final File actualFile) {
- this.queryFile = queryFile;
- this.actualFile = actualFile;
+ public JsonLogicalPlanTest(final File queryFile, final File expectedFile, final File actualFile) {
+ super(queryFile, expectedFile, actualFile);
}
@Test
public void test() throws Exception {
- try {
- String queryFileShort =
- queryFile.getPath().substring(PATH_QUERIES.length()).replace(SEPARATOR.charAt(0), '/');
- if (!only.isEmpty()) {
- boolean toRun = TestHelper.isInPrefixList(only, queryFileShort);
- if (!toRun) {
- LOGGER.info("SKIP TEST: \"" + queryFile.getPath()
- + "\" \"only.txt\" not empty and not in \"only.txt\".");
+ super.test();
+ }
+
+ @Override
+ protected void runAndCompare(String query, ILangCompilationProvider provider, Map<String, IAObject> queryParams,
+ IHyracksClientConnection hcc, List<String> linesExpected) throws Exception {
+ FileUtils.writeStringToFile(actualFile, "", StandardCharsets.UTF_8);
+ String planStr;
+ try (PrintWriter plan = new PrintWriter(actualFile)) {
+ AsterixJavaClient asterix = new AsterixJavaClient(
+ (ICcApplicationContext) integrationUtil.cc.getApplicationContext(), hcc, new StringReader(query),
+ plan, provider, statementExecutorFactory, storageComponentProvider);
+ asterix.setStatementParameters(queryParams);
+ asterix.compile(true, false, !optimized, optimized, false, false, false, PlanFormat.JSON);
+ ExecutionPlans executionPlans = asterix.getExecutionPlans();
+ planStr = optimized ? executionPlans.getOptimizedLogicalPlan() : executionPlans.getLogicalPlan();
+ plan.write(planStr);
+ } catch (AsterixException e) {
+ throw new Exception("Compile ERROR for " + queryFile + ": " + e.getMessage(), e);
+ }
+
+ BufferedReader readerActual =
+ new BufferedReader(new InputStreamReader(new FileInputStream(actualFile), "UTF-8"));
+ String lineActual, objectActual = "";
+ boolean firstPlan = false;
+ while ((lineActual = readerActual.readLine()) != null) {
+ if (lineActual.contains("--")) {
+ if (firstPlan) {
+ break;
}
- Assume.assumeTrue(toRun);
- }
- boolean skipped = TestHelper.isInPrefixList(ignore, queryFileShort);
- if (skipped) {
- LOGGER.info("SKIP TEST: \"" + queryFile.getPath() + "\" in \"ignore.txt\".");
- }
- Assume.assumeTrue(!skipped);
+ firstPlan = true;
- LOGGER.info("RUN TEST: \"" + queryFile.getPath() + "\"");
- String query = FileUtils.readFileToString(queryFile, StandardCharsets.UTF_8);
- Map<String, IAObject> queryParams = TestHelper.readStatementParameters(query);
-
- // Forces the creation of actualFile.
- actualFile.getParentFile().mkdirs();
-
- ILangCompilationProvider provider = sqlppCompilationProvider;
- if (extensionLangCompilationProvider != null) {
- provider = extensionLangCompilationProvider;
- }
- IHyracksClientConnection hcc = integrationUtil.getHyracksClientConnection();
- String planStr;
- try (PrintWriter plan = new PrintWriter(actualFile)) {
- AsterixJavaClient asterix = new AsterixJavaClient(
- (ICcApplicationContext) integrationUtil.cc.getApplicationContext(), hcc,
- new StringReader(query), plan, provider, statementExecutorFactory, storageComponentProvider);
- asterix.setStatementParameters(queryParams);
- asterix.compile(true, false, !optimized, optimized, false, false, false, PlanFormat.JSON);
- ExecutionPlans executionPlans = asterix.getExecutionPlans();
- planStr = optimized ? executionPlans.getOptimizedLogicalPlan() : executionPlans.getLogicalPlan();
- plan.write(planStr);
- } catch (AsterixException e) {
- throw new Exception("Compile ERROR for " + queryFile + ": " + e.getMessage(), e);
- }
-
- BufferedReader readerActual =
- new BufferedReader(new InputStreamReader(new FileInputStream(actualFile), "UTF-8"));
- String lineActual, objectActual = "";
- boolean firstPlan = false;
- while ((lineActual = readerActual.readLine()) != null) {
- if (lineActual.contains("--")) {
- if (firstPlan) {
- break;
- }
- firstPlan = true;
-
- } else {
- objectActual = objectActual + lineActual;
- }
- }
-
- try {
- JsonNode jsonNode = OBJECT_MAPPER.readTree(planStr);
- if (jsonNode == null || !jsonNode.isObject()) {
- throw new Exception("ERROR: No JSON plan or plan is malformed!");
- }
- } finally {
- readerActual.close();
- }
-
- } catch (Exception e) {
- if (!(e instanceof AssumptionViolatedException)) {
- LOGGER.error("Test \"" + queryFile.getPath() + "\" FAILED!");
- throw new Exception("Test \"" + queryFile.getPath() + "\" FAILED!", e);
} else {
- throw e;
+ objectActual = objectActual + lineActual;
}
}
+
+ try {
+ JsonNode jsonNode = OBJECT_MAPPER.readTree(planStr);
+ if (jsonNode == null || !jsonNode.isObject()) {
+ throw new Exception("ERROR: No JSON plan or plan is malformed!");
+ }
+ } finally {
+ readerActual.close();
+ }
+ }
+
+ @Override
+ protected List<String> getExpectedLines() {
+ // this test only checks the produced result is valid, so no expected results
+ return Collections.emptyList();
}
}
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonOptimizedLogicalPlanTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonOptimizedLogicalPlanTest.java
index b1fe529..7f78743 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonOptimizedLogicalPlanTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/jsonplan/JsonOptimizedLogicalPlanTest.java
@@ -20,16 +20,27 @@
package org.apache.asterix.test.jsonplan;
import java.io.File;
+import java.util.Collection;
+import org.apache.asterix.test.optimizer.AbstractOptimizerTest;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
public class JsonOptimizedLogicalPlanTest extends JsonLogicalPlanTest {
- public JsonOptimizedLogicalPlanTest(File queryFile, File actualFile) {
- super(queryFile, actualFile);
+ static {
+ EXTENSION_RESULT = "plan.json";
optimized = true;
PATH_ACTUAL = "target" + File.separator + "joptplantest" + SEPARATOR;
}
+
+ public JsonOptimizedLogicalPlanTest(File queryFile, File expectedFile, File actualFile) {
+ super(queryFile, expectedFile, actualFile);
+ }
+
+ @Parameterized.Parameters(name = "JsonOptimizedLogicalPlanTest {index}: {0}")
+ public static Collection<Object[]> tests() {
+ return AbstractOptimizerTest.tests();
+ }
}
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/AbstractOptimizerTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/AbstractOptimizerTest.java
new file mode 100644
index 0000000..0fba54b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/AbstractOptimizerTest.java
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.test.optimizer;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.asterix.api.common.AsterixHyracksIntegrationUtil;
+import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
+import org.apache.asterix.common.config.GlobalConfig;
+import org.apache.asterix.common.context.IStorageComponentProvider;
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
+import org.apache.asterix.external.util.ExternalDataConstants;
+import org.apache.asterix.external.util.IdentitiyResolverFactory;
+import org.apache.asterix.file.StorageComponentProvider;
+import org.apache.asterix.om.base.IAObject;
+import org.apache.asterix.test.base.AsterixTestHelper;
+import org.apache.asterix.test.common.TestHelper;
+import org.apache.asterix.test.runtime.HDFSCluster;
+import org.apache.asterix.translator.IStatementExecutorFactory;
+import org.apache.commons.io.FileUtils;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.AfterClass;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.internal.AssumptionViolatedException;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public abstract class AbstractOptimizerTest {
+
+ private static final Logger LOGGER = LogManager.getLogger();
+
+ protected static final String SEPARATOR = File.separator;
+ protected static final String EXTENSION_SQLPP = "sqlpp";
+ protected static String EXTENSION_RESULT;
+ protected static final String FILENAME_IGNORE = "ignore.txt";
+ protected static final String FILENAME_ONLY = "only.txt";
+ protected static final String PATH_BASE =
+ "src" + SEPARATOR + "test" + SEPARATOR + "resources" + SEPARATOR + "optimizerts" + SEPARATOR;
+ protected static final String PATH_QUERIES = PATH_BASE + "queries" + SEPARATOR;
+ protected static final String PATH_EXPECTED = PATH_BASE + "results" + SEPARATOR;
+ protected static String PATH_ACTUAL;
+
+ protected static final ArrayList<String> ignore = AsterixTestHelper.readTestListFile(FILENAME_IGNORE, PATH_BASE);
+ protected static final ArrayList<String> only = AsterixTestHelper.readTestListFile(FILENAME_ONLY, PATH_BASE);
+ protected static final String TEST_CONFIG_FILE_NAME = "src/main/resources/cc.conf";
+ protected static final ILangCompilationProvider sqlppCompilationProvider = new SqlppCompilationProvider();
+ protected static ILangCompilationProvider extensionLangCompilationProvider = null;
+ protected static IStatementExecutorFactory statementExecutorFactory = new DefaultStatementExecutorFactory();
+ protected static IStorageComponentProvider storageComponentProvider = new StorageComponentProvider();
+ protected static AsterixHyracksIntegrationUtil integrationUtil = new AsterixHyracksIntegrationUtil();
+
+ private static final String REPEAT_EXEC = "repeat_exec:(.*)";
+ private static final Pattern PATTERN_REPEAT_EXEC = Pattern.compile(REPEAT_EXEC);
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, TEST_CONFIG_FILE_NAME);
+ final File outdir = new File(PATH_ACTUAL);
+ outdir.mkdirs();
+
+ HDFSCluster.getInstance().setup();
+
+ integrationUtil.init(true, TEST_CONFIG_FILE_NAME);
+ // Set the node resolver to be the identity resolver that expects node names
+ // to be node controller ids; a valid assumption in test environment.
+ System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY,
+ IdentitiyResolverFactory.class.getName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ File outdir = new File(PATH_ACTUAL);
+ File[] files = outdir.listFiles();
+ if (files == null || files.length == 0) {
+ outdir.delete();
+ }
+
+ HDFSCluster.getInstance().cleanup();
+
+ integrationUtil.deinit(true);
+ }
+
+ private static void suiteBuildPerFile(File file, Collection<Object[]> testArgs, String path) {
+ if (file.isDirectory() && !file.getName().startsWith(".")) {
+ File[] files = file.listFiles();
+ Arrays.sort(files);
+ for (File innerfile : files) {
+ String subdir = innerfile.isDirectory() ? path + innerfile.getName() + SEPARATOR : path;
+ suiteBuildPerFile(innerfile, testArgs, subdir);
+ }
+ }
+ if (file.isFile() && file.getName().endsWith(EXTENSION_SQLPP)) {
+ String resultFileName = AsterixTestHelper.extToResExt(file.getName(), EXTENSION_RESULT);
+ File expectedFile = new File(PATH_EXPECTED + path + resultFileName);
+ File actualFile = new File(PATH_ACTUAL + SEPARATOR + path + resultFileName);
+ testArgs.add(new Object[] { file, expectedFile, actualFile });
+ }
+ }
+
+ protected static Collection<Object[]> tests() {
+ Collection<Object[]> testArgs = new ArrayList<>();
+ if (only.isEmpty()) {
+ suiteBuildPerFile(new File(PATH_QUERIES), testArgs, "");
+ } else {
+ for (String path : only) {
+ suiteBuildPerFile(new File(PATH_QUERIES + path), testArgs,
+ path.lastIndexOf(SEPARATOR) < 0 ? "" : path.substring(0, path.lastIndexOf(SEPARATOR) + 1));
+ }
+ }
+ return testArgs;
+ }
+
+ protected final File actualFile;
+ protected final File expectedFile;
+ protected final File queryFile;
+
+ public AbstractOptimizerTest(final File queryFile, final File expectedFile, final File actualFile) {
+ this.queryFile = queryFile;
+ this.expectedFile = expectedFile;
+ this.actualFile = actualFile;
+ }
+
+ protected abstract void runAndCompare(String query, ILangCompilationProvider provider,
+ Map<String, IAObject> queryParams, IHyracksClientConnection hcc, List<String> linesExpected)
+ throws Exception;
+
+ protected abstract List<String> getExpectedLines() throws IOException;
+
+ @Test
+ public void test() throws Exception {
+ try {
+ String queryFileShort =
+ queryFile.getPath().substring(PATH_QUERIES.length()).replace(SEPARATOR.charAt(0), '/');
+ if (!only.isEmpty()) {
+ boolean toRun = TestHelper.isInPrefixList(only, queryFileShort);
+ if (!toRun) {
+ LOGGER.info("SKIP TEST: \"" + queryFile.getPath()
+ + "\" \"only.txt\" not empty and not in \"only.txt\".");
+ }
+ Assume.assumeTrue(toRun);
+ }
+ boolean skipped = TestHelper.isInPrefixList(ignore, queryFileShort);
+ if (skipped) {
+ LOGGER.info("SKIP TEST: \"" + queryFile.getPath() + "\" in \"ignore.txt\".");
+ }
+ Assume.assumeTrue(!skipped);
+
+ LOGGER.info("RUN TEST: \"" + queryFile.getPath() + "\"");
+ String query = FileUtils.readFileToString(queryFile, StandardCharsets.UTF_8);
+ Map<String, IAObject> queryParams = TestHelper.readStatementParameters(query);
+ Matcher matcher = PATTERN_REPEAT_EXEC.matcher(query);
+ boolean repeat = false;
+ String placeholder = null;
+ JsonNode substitutions = null;
+ if (matcher.find()) {
+ repeat = true;
+ String placeholderSubstitutions = matcher.group(1);
+ String[] split = placeholderSubstitutions.split("=", 2);
+ placeholder = split[0].trim();
+ substitutions = MAPPER.readTree(split[1]);
+ }
+
+ LOGGER.info("ACTUAL RESULT FILE: " + actualFile.getAbsolutePath());
+
+ // Forces the creation of actualFile.
+ actualFile.getParentFile().mkdirs();
+
+ ILangCompilationProvider provider = sqlppCompilationProvider;
+ if (extensionLangCompilationProvider != null) {
+ provider = extensionLangCompilationProvider;
+ }
+ IHyracksClientConnection hcc = integrationUtil.getHyracksClientConnection();
+ List<String> linesExpected = getExpectedLines();
+ if (repeat) {
+ runAndRepeat(placeholder, substitutions, query, provider, queryParams, hcc, linesExpected);
+ } else {
+ runAndCompare(query, provider, queryParams, hcc, linesExpected);
+ }
+
+ LOGGER.info("Test \"" + queryFile.getPath() + "\" PASSED!");
+ actualFile.delete();
+ } catch (Exception e) {
+ if (!(e instanceof AssumptionViolatedException)) {
+ LOGGER.error("Test \"" + queryFile.getPath() + "\" FAILED!");
+ throw new Exception("Test \"" + queryFile.getPath() + "\" FAILED!", e);
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ private void runAndRepeat(String placeholder, JsonNode substitutions, String query,
+ ILangCompilationProvider provider, Map<String, IAObject> queryParams, IHyracksClientConnection hcc,
+ List<String> linesExpected) throws Exception {
+ if (substitutions.isArray()) {
+ for (int i = 0, size = substitutions.size(); i < size; i++) {
+ String substitute = substitutions.get(i).asText();
+ String newQuery = query.replaceAll(placeholder, substitute);
+ runAndCompare(newQuery, provider, queryParams, hcc, linesExpected);
+ }
+ } else {
+ runAndCompare(query, provider, queryParams, hcc, linesExpected);
+ }
+ }
+}
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/OptimizerTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/OptimizerTest.java
index dbf8f2c..a89585d 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/OptimizerTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/optimizer/OptimizerTest.java
@@ -19,12 +19,11 @@
package org.apache.asterix.test.optimizer;
import java.io.File;
+import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -32,31 +31,14 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.asterix.api.common.AsterixHyracksIntegrationUtil;
import org.apache.asterix.api.java.AsterixJavaClient;
-import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
-import org.apache.asterix.common.context.IStorageComponentProvider;
import org.apache.asterix.common.dataflow.ICcApplicationContext;
import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
-import org.apache.asterix.external.util.ExternalDataConstants;
-import org.apache.asterix.external.util.IdentitiyResolverFactory;
-import org.apache.asterix.file.StorageComponentProvider;
import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.test.base.AsterixTestHelper;
-import org.apache.asterix.test.common.TestHelper;
-import org.apache.asterix.test.runtime.HDFSCluster;
-import org.apache.asterix.translator.IStatementExecutorFactory;
import org.apache.commons.io.FileUtils;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.junit.AfterClass;
-import org.junit.Assume;
-import org.junit.BeforeClass;
import org.junit.Test;
-import org.junit.internal.AssumptionViolatedException;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@@ -67,183 +49,76 @@
* query by setting the property (append the test case name with "_ps")
*/
@RunWith(Parameterized.class)
-public class OptimizerTest {
-
- private static final Logger LOGGER = LogManager.getLogger();
-
- private static final String SEPARATOR = File.separator;
- private static final String EXTENSION_SQLPP = "sqlpp";
- private static final String EXTENSION_RESULT = "plan";
- private static final String FILENAME_IGNORE = "ignore.txt";
- private static final String FILENAME_ONLY = "only.txt";
- private static final String PATH_BASE =
- "src" + SEPARATOR + "test" + SEPARATOR + "resources" + SEPARATOR + "optimizerts" + SEPARATOR;
- private static final String PATH_QUERIES = PATH_BASE + "queries" + SEPARATOR;
- private static final String PATH_EXPECTED = PATH_BASE + "results" + SEPARATOR;
- protected static final String PATH_ACTUAL = "target" + File.separator + "opttest" + SEPARATOR;
-
- private static final ArrayList<String> ignore = AsterixTestHelper.readTestListFile(FILENAME_IGNORE, PATH_BASE);
- private static final ArrayList<String> only = AsterixTestHelper.readTestListFile(FILENAME_ONLY, PATH_BASE);
- protected static final String TEST_CONFIG_FILE_NAME = "src/main/resources/cc.conf";
- private static final ILangCompilationProvider sqlppCompilationProvider = new SqlppCompilationProvider();
- protected static ILangCompilationProvider extensionLangCompilationProvider = null;
- protected static IStatementExecutorFactory statementExecutorFactory = new DefaultStatementExecutorFactory();
- protected static IStorageComponentProvider storageComponentProvider = new StorageComponentProvider();
-
- protected static AsterixHyracksIntegrationUtil integrationUtil = new AsterixHyracksIntegrationUtil();
+public class OptimizerTest extends AbstractOptimizerTest {
private static final String PATTERN_VAR_ID_PREFIX = "\\$\\$";
private static final Pattern PATTERN_VAR_ID = Pattern.compile(PATTERN_VAR_ID_PREFIX + "(\\d+)");
- @BeforeClass
- public static void setUp() throws Exception {
- final File outdir = new File(PATH_ACTUAL);
- outdir.mkdirs();
-
- HDFSCluster.getInstance().setup();
-
- integrationUtil.init(true, TEST_CONFIG_FILE_NAME);
- // Set the node resolver to be the identity resolver that expects node names
- // to be node controller ids; a valid assumption in test environment.
- System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY,
- IdentitiyResolverFactory.class.getName());
- }
-
- @AfterClass
- public static void tearDown() throws Exception {
- File outdir = new File(PATH_ACTUAL);
- File[] files = outdir.listFiles();
- if (files == null || files.length == 0) {
- outdir.delete();
- }
-
- HDFSCluster.getInstance().cleanup();
-
- integrationUtil.deinit(true);
- }
-
- private static void suiteBuildPerFile(File file, Collection<Object[]> testArgs, String path) {
- if (file.isDirectory() && !file.getName().startsWith(".")) {
- File[] files = file.listFiles();
- Arrays.sort(files);
- for (File innerfile : files) {
- String subdir = innerfile.isDirectory() ? path + innerfile.getName() + SEPARATOR : path;
- suiteBuildPerFile(innerfile, testArgs, subdir);
- }
- }
- if (file.isFile() && file.getName().endsWith(EXTENSION_SQLPP)) {
- String resultFileName = AsterixTestHelper.extToResExt(file.getName(), EXTENSION_RESULT);
- File expectedFile = new File(PATH_EXPECTED + path + resultFileName);
- File actualFile = new File(PATH_ACTUAL + SEPARATOR + path + resultFileName);
- testArgs.add(new Object[] { file, expectedFile, actualFile });
- }
+ static {
+ EXTENSION_RESULT = "plan";
+ PATH_ACTUAL = "target" + File.separator + "opttest" + SEPARATOR;
}
@Parameters(name = "OptimizerTest {index}: {0}")
public static Collection<Object[]> tests() {
- Collection<Object[]> testArgs = new ArrayList<>();
- if (only.isEmpty()) {
- suiteBuildPerFile(new File(PATH_QUERIES), testArgs, "");
- } else {
- for (String path : only) {
- suiteBuildPerFile(new File(PATH_QUERIES + path), testArgs,
- path.lastIndexOf(SEPARATOR) < 0 ? "" : path.substring(0, path.lastIndexOf(SEPARATOR) + 1));
- }
- }
- return testArgs;
+ return AbstractOptimizerTest.tests();
}
- private final File actualFile;
- private final File expectedFile;
- private final File queryFile;
-
public OptimizerTest(final File queryFile, final File expectedFile, final File actualFile) {
- this.queryFile = queryFile;
- this.expectedFile = expectedFile;
- this.actualFile = actualFile;
+ super(queryFile, expectedFile, actualFile);
}
@Test
public void test() throws Exception {
- try {
- String queryFileShort =
- queryFile.getPath().substring(PATH_QUERIES.length()).replace(SEPARATOR.charAt(0), '/');
- if (!only.isEmpty()) {
- boolean toRun = TestHelper.isInPrefixList(only, queryFileShort);
- if (!toRun) {
- LOGGER.info("SKIP TEST: \"" + queryFile.getPath()
- + "\" \"only.txt\" not empty and not in \"only.txt\".");
- }
- Assume.assumeTrue(toRun);
- }
- boolean skipped = TestHelper.isInPrefixList(ignore, queryFileShort);
- if (skipped) {
- LOGGER.info("SKIP TEST: \"" + queryFile.getPath() + "\" in \"ignore.txt\".");
- }
- Assume.assumeTrue(!skipped);
+ super.test();
+ }
- LOGGER.info("RUN TEST: \"" + queryFile.getPath() + "\"");
- String query = FileUtils.readFileToString(queryFile, StandardCharsets.UTF_8);
- Map<String, IAObject> queryParams = TestHelper.readStatementParameters(query);
-
- LOGGER.info("ACTUAL RESULT FILE: " + actualFile.getAbsolutePath());
-
- // Forces the creation of actualFile.
- actualFile.getParentFile().mkdirs();
-
- ILangCompilationProvider provider = sqlppCompilationProvider;
- if (extensionLangCompilationProvider != null) {
- provider = extensionLangCompilationProvider;
- }
- IHyracksClientConnection hcc = integrationUtil.getHyracksClientConnection();
- try (PrintWriter plan = new PrintWriter(actualFile)) {
- AsterixJavaClient asterix = new AsterixJavaClient(
- (ICcApplicationContext) integrationUtil.cc.getApplicationContext(), hcc,
- new StringReader(query), plan, provider, statementExecutorFactory, storageComponentProvider);
- asterix.setStatementParameters(queryParams);
- asterix.compile(true, false, false, true, true, false, false);
- } catch (AlgebricksException e) {
- throw new Exception("Compile ERROR for " + queryFile + ": " + e.getMessage(), e);
- }
-
- List<String> linesExpected = Files.readAllLines(expectedFile.toPath(), StandardCharsets.UTF_8);
- List<String> linesActual = Files.readAllLines(actualFile.toPath(), StandardCharsets.UTF_8);
-
- int varBaseExpected = findBaseVarId(linesExpected);
- int varBaseActual = findBaseVarId(linesActual);
-
- Iterator<String> readerExpected = linesExpected.iterator();
- Iterator<String> readerActual = linesActual.iterator();
- String lineExpected, lineActual;
- int num = 1;
- while (readerExpected.hasNext()) {
- lineExpected = readerExpected.next();
- if (!readerActual.hasNext()) {
- throw new Exception(
- "Result for " + queryFile + " changed at line " + num + ":\n< " + lineExpected + "\n> ");
- }
- lineActual = readerActual.next();
-
- if (!planLineEquals(lineExpected, varBaseExpected, lineActual, varBaseActual)) {
- throw new Exception("Result for " + queryFile + " changed at line " + num + ":\n< " + lineExpected
- + "\n> " + lineActual);
- }
- ++num;
- }
- if (readerActual.hasNext()) {
- throw new Exception(
- "Result for " + queryFile + " changed at line " + num + ":\n< \n> " + readerActual.next());
- }
- LOGGER.info("Test \"" + queryFile.getPath() + "\" PASSED!");
- actualFile.delete();
- } catch (Exception e) {
- if (!(e instanceof AssumptionViolatedException)) {
- LOGGER.error("Test \"" + queryFile.getPath() + "\" FAILED!");
- throw new Exception("Test \"" + queryFile.getPath() + "\" FAILED!", e);
- } else {
- throw e;
- }
+ @Override
+ protected void runAndCompare(String query, ILangCompilationProvider provider, Map<String, IAObject> queryParams,
+ IHyracksClientConnection hcc, List<String> linesExpected) throws Exception {
+ FileUtils.writeStringToFile(actualFile, "", StandardCharsets.UTF_8);
+ try (PrintWriter plan = new PrintWriter(actualFile)) {
+ AsterixJavaClient asterix = new AsterixJavaClient(
+ (ICcApplicationContext) integrationUtil.cc.getApplicationContext(), hcc, new StringReader(query),
+ plan, provider, statementExecutorFactory, storageComponentProvider);
+ asterix.setStatementParameters(queryParams);
+ asterix.compile(true, false, false, true, true, false, false);
+ } catch (AlgebricksException e) {
+ throw new Exception("Compile ERROR for " + queryFile + ": " + e.getMessage(), e);
}
+
+ List<String> linesActual = Files.readAllLines(actualFile.toPath(), StandardCharsets.UTF_8);
+
+ int varBaseExpected = findBaseVarId(linesExpected);
+ int varBaseActual = findBaseVarId(linesActual);
+
+ Iterator<String> readerExpected = linesExpected.iterator();
+ Iterator<String> readerActual = linesActual.iterator();
+ String lineExpected, lineActual;
+ int num = 1;
+ while (readerExpected.hasNext()) {
+ lineExpected = readerExpected.next();
+ if (!readerActual.hasNext()) {
+ throw new Exception(
+ "Result for " + queryFile + " changed at line " + num + ":\n< " + lineExpected + "\n> ");
+ }
+ lineActual = readerActual.next();
+
+ if (!planLineEquals(lineExpected, varBaseExpected, lineActual, varBaseActual)) {
+ throw new Exception("Result for " + queryFile + " changed at line " + num + ":\n< " + lineExpected
+ + "\n> " + lineActual);
+ }
+ ++num;
+ }
+ if (readerActual.hasNext()) {
+ throw new Exception(
+ "Result for " + queryFile + " changed at line " + num + ":\n< \n> " + readerActual.next());
+ }
+ }
+
+ @Override
+ protected List<String> getExpectedLines() throws IOException {
+ return Files.readAllLines(expectedFile.toPath(), StandardCharsets.UTF_8);
}
private boolean planLineEquals(String lineExpected, int varIdBaseExpected, String lineActual, int varIdBaseActual) {
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.sqlpp
deleted file mode 100644
index 8c760a6..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.sqlpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {
-"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE INDEX idx1 ON ds1(x: int);
-CREATE VIEW view1(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds1;
-
-// test that idx1 on x is not used since idx1 does not have the CAST modifier and the field x has cast
-SELECT id, x, y FROM view1 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.sqlpp
deleted file mode 100644
index 8a09ba6..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.sqlpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {
-"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
-CREATE VIEW view2(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds2;
-
-// test that idx2 on x is used since idx2 has the CAST modifier and the field x has cast
-SELECT id, x, y FROM view2 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.sqlpp
deleted file mode 100644
index 7cc0f67..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.sqlpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
-CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
-
-// test that idx3 on x is not used since idx3 has the CAST modifier on int and the field x has cast as string
-SELECT id, x, y FROM view3 WHERE x <= "1" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.sqlpp
deleted file mode 100644
index 0c908ea..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.sqlpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
-CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
-
-// test that idx3 on x is not used since idx3 has the CAST modifier and the field x does not have cast
-SELECT id, x, y FROM ds3 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.sqlpp
deleted file mode 100644
index 9d3da6f..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.sqlpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view2(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds2;
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-
-USE test;
-// test that idx2 on view2(x) is used. both v4.x and v2.x are int and both v2.x and idx2 use int-default-null.
-SELECT v4.x AS v4x, v2.x AS v2x
-FROM view4 AS v4, view2 AS v2
-WHERE v4.x /*+ indexnl */ = v2.x ORDER BY v4x, v2x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.sqlpp
deleted file mode 100644
index bfe5517..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.sqlpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-USE test;
-// test that idx3 on view3(x) is not used because v3.x uses string-default-null and idx3 uses int-default-null
-SELECT v4.x AS v4x, v3.x AS v3x
-FROM view4 AS v4, view3 AS v3
-WHERE v4.x /*+ indexnl */ = v3.x ORDER BY v4x, v3x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.sqlpp
deleted file mode 100644
index 76321d4..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.sqlpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds1(x: int);
-
-CREATE VIEW view1(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds1;
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-USE test;
-// test that idx1 is not used because idx1 does not have CAST modifier (idx1 is just int and v1.x uses int-default-null).
-SELECT v4.x AS v4x, v1.x AS v1x
-FROM view4 AS v4, view1 AS v1
-WHERE v4.x /*+ indexnl */ = v1.x ORDER BY v4x, v1x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.sqlpp
deleted file mode 100644
index 76321d4..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.sqlpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds1(x: int);
-
-CREATE VIEW view1(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds1;
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-USE test;
-// test that idx1 is not used because idx1 does not have CAST modifier (idx1 is just int and v1.x uses int-default-null).
-SELECT v4.x AS v4x, v1.x AS v1x
-FROM view4 AS v4, view1 AS v1
-WHERE v4.x /*+ indexnl */ = v1.x ORDER BY v4x, v1x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.sqlpp
deleted file mode 100644
index 1199148..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.sqlpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-USE test;
-// test that idx2 is not used because idx2 uses int-default-null and ds2.x is just int.
-SELECT v4.x AS v4x, ds2.x AS ds2x
-FROM view4 AS v4, ds2 AS ds2
-WHERE v4.x /*+ indexnl */ = ds2.x ORDER BY v4x, ds2x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.sqlpp
deleted file mode 100644
index 0c2871e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.sqlpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
-
-CREATE VIEW view5_dt_fmt(id int, f_dt_fmt datetime) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_dt_fmt FROM ds5;
-
-// testing that idx5_dt_fmt is selected
-SELECT VALUE v
-FROM view5_dt_fmt AS v
-WHERE v.f_dt_fmt < datetime('2020-12-20T00:00:00')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.sqlpp
deleted file mode 100644
index f82ab78..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.sqlpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_d_fmt ON ds5(f_d_fmt: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
-
-CREATE VIEW view5_d_fmt(id int, f_d_fmt date) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_d_fmt FROM ds5;
-
-// testing that idx5_d_fmt is selected
-SELECT VALUE v
-FROM view5_d_fmt AS v
-WHERE v.f_d_fmt < date('2020-12-20')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.sqlpp
deleted file mode 100644
index dcb6e51..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.sqlpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_t_fmt ON ds5(f_t_fmt: time) CAST (DEFAULT NULL time 'hh:mm:ss.nnna');
-
-CREATE VIEW view5_t_fmt(id int, f_t_fmt time) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_t_fmt FROM ds5;
-
-// testing that idx5_t_fmt is selected
-SELECT VALUE v
-FROM view5_t_fmt AS v
-WHERE v.f_t_fmt < time('18:13:03')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.sqlpp
deleted file mode 100644
index 8b47600..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.sqlpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx6_dt ON ds6(f_dt: datetime) CAST (DEFAULT NULL);
-
-CREATE VIEW view6_dt(id int, f_dt datetime) DEFAULT NULL AS SELECT id, f_dt FROM ds6;
-
-// testing that idx6_dt is selected
-SELECT VALUE v
-FROM view6_dt AS v
-WHERE v.f_dt < datetime('2020-12-20T00:00:00')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.sqlpp
deleted file mode 100644
index bc0686e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.sqlpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx6_d ON ds6(f_d: date) CAST (DEFAULT NULL);
-
-CREATE VIEW view6_d(id int, f_d date) DEFAULT NULL AS SELECT id, f_d FROM ds6;
-
-// testing that idx6_d is selected
-SELECT VALUE v
-FROM view6_d AS v
-WHERE v.f_d < date('2020-12-20')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.sqlpp
deleted file mode 100644
index 18860c8..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.sqlpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx6_t ON ds6(f_t: time) CAST (DEFAULT NULL);
-
-CREATE VIEW view6_t(id int, f_t time) DEFAULT NULL AS SELECT id, f_t FROM ds6;
-
-// testing that idx6_t is selected
-SELECT VALUE v
-FROM view6_t AS v
-WHERE v.f_t < time('18:13:03')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.sqlpp
deleted file mode 100644
index 3e4eaff..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.sqlpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
-
-CREATE VIEW view5_dt_fmt(id int, f_dt_fmt datetime) DEFAULT NULL
-datetime 'MM-DD-YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_dt_fmt FROM ds5;
-
-// testing that the index idx5_dt_fmt is not selected because its datetime format is not the same as view view5_dt_fmt
-SELECT VALUE v
-FROM view5_dt_fmt AS v
-WHERE v.f_dt_fmt < datetime('2020-12-20T00:00:00')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.sqlpp
deleted file mode 100644
index 09611b4..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.sqlpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx6_d_fmt ON ds6(f_d: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
-
-CREATE VIEW view6_d(id int, f_d date) DEFAULT NULL AS SELECT id, f_d FROM ds6;
-
-// testing that idx6_d_fmt is not selected because the date function in index is with format and the view without format
-SELECT VALUE v
-FROM view6_d AS v
-WHERE v.f_d < date('2020-12-20')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.sqlpp
deleted file mode 100644
index cc216dc..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.sqlpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_t ON ds5(f_t_fmt: time) CAST (DEFAULT NULL);
-
-CREATE VIEW view5_t_fmt(id int, f_t_fmt time) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_t_fmt FROM ds5;
-
-// testing that idx5_t is not selected because the time function in index is without format and the view with format
-SELECT VALUE v
-FROM view5_t_fmt AS v
-WHERE v.f_t_fmt < time('18:13:03')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.sqlpp
deleted file mode 100644
index dc0f66d..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.sqlpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
-
-CREATE VIEW view5_dt_fmt(id int, f_dt_fmt datetime) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_dt_fmt FROM ds5;
-
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx6_dt ON ds6(f_dt: datetime) CAST (DEFAULT NULL);
-
-CREATE VIEW view6_dt(id int, f_dt datetime) DEFAULT NULL AS SELECT id, f_dt FROM ds6;
-
-USE test;
-// testing that idx5_dt_fmt is used
-SELECT v6.f_dt AS v6f_dt, v5.f_dt_fmt AS v5f_dt_fmt
-FROM view6_dt AS v6, view5_dt_fmt AS v5
-WHERE v6.f_dt /*+ indexnl */ = v5.f_dt_fmt ORDER BY v6f_dt, v5f_dt_fmt;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.sqlpp
deleted file mode 100644
index cb77c5f..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.sqlpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-
-USE test;
-// index idx2 should be used
-SELECT id, s_f2 FROM view7_1 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.sqlpp
deleted file mode 100644
index 371a15b..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.sqlpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-
-USE test;
-// no index is used (and no result is returned because of incompatible types. s_f2 string vs. 4 int)
-SELECT id, s_f2 FROM view7_1 WHERE s_f2 < 4 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.sqlpp
deleted file mode 100644
index 9021e22..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.sqlpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-
-USE test;
-// no index is used (and no result is returned because of incompatible types. s_f2 int vs. "4" string)
-SELECT id, s_f2 FROM view7_2 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.sqlpp
deleted file mode 100644
index ff85182..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.sqlpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-
-USE test;
-// index idx3 should be used
-SELECT id, s_f2 FROM view7_2 WHERE s_f2 < 4 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.sqlpp
deleted file mode 100644
index c55bb15..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.sqlpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy":
-{"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-
-USE test;
-// index idx1 should be used
-set `compiler.indexonly` "false"; // there is an issue with using index only plan where nulls/missings are included
-SELECT id, s_f2 FROM ds7 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-01.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-01.sqlpp
index 9721183..180cd62 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-01.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-01.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds1(x: int);
CREATE VIEW view1(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds1;
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-02.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-02.sqlpp
index 969a769..8de9cfc 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-02.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-02.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
CREATE VIEW view2(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds2;
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-03.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-03.sqlpp
index 2d3fa85..6001e60 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-03.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-03.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-04.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-04.sqlpp
index f3d2ecc..db3a728 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-04.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-04.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-05.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-05.sqlpp
index d5d2e21..505d704 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-05.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-05.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-06.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-06.sqlpp
index a5697b4..72fe838 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-06.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-06.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-07.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-07.sqlpp
index ad2a058..e5f286a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-07.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-07.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds1(x: int);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-08.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-08.sqlpp
index ad2a058..e5f286a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-08.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-08.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds1(x: int);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-09.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-09.sqlpp
index 0ed83a8..b8ee866 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-09.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-09.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-10.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-10.sqlpp
index f569a58..7bf7df5 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-10.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-10.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-11.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-11.sqlpp
index a9e7652..fb81f5c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-11.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-11.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_d_fmt ON ds5(f_d_fmt: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-12.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-12.sqlpp
index e97c4ea..2418082 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-12.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-12.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_t_fmt ON ds5(f_t_fmt: time) CAST (DEFAULT NULL time 'hh:mm:ss.nnna');
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-13.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-13.sqlpp
index e3361e9..5d72810 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-13.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-13.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx6_dt ON ds6(f_dt: datetime) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-14.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-14.sqlpp
index 79ee051..fd95610 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-14.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-14.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx6_d ON ds6(f_d: date) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-15.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-15.sqlpp
index 2ec3f7e..e60ac07 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-15.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-15.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx6_t ON ds6(f_t: time) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-16.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-16.sqlpp
index cb4e069..815170a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-16.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-16.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-17.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-17.sqlpp
index 398f816..691a558 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-17.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-17.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx6_d_fmt ON ds6(f_d: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-18.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-18.sqlpp
index b55f4e8..30c4e72 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-18.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-18.sqlpp
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_t ON ds5(f_t_fmt: time) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-19.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-19.sqlpp
index 714bf05..03c649a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-19.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-19.sqlpp
@@ -16,19 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
CREATE VIEW view5_dt_fmt(id int, f_dt_fmt datetime) DEFAULT NULL
datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_dt_fmt FROM ds5;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
CREATE INDEX idx6_dt ON ds6(f_dt: datetime) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-20.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-20.sqlpp
index d0229a3..4fc08dc 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-20.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-20.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds7(s_f2);
CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-21.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-21.sqlpp
index fcf95e6..eb2994c 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-21.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-21.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds7(s_f2);
CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-22.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-22.sqlpp
index 4e32cfb..dc1875a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-22.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-22.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds7(s_f2);
CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-23.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-23.sqlpp
index a9bd6ba..9c8006f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-23.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-23.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds7(s_f2);
CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-24.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-24.sqlpp
index ba2c8ff..8df277a 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-24.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/btree-index-selection/cast-default-null/cast-default-null-24.sqlpp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+// repeat_exec: %with% = ["", "WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" ]
DROP DATAVERSE test IF EXISTS;
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds7(s_f2);
CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.plan
deleted file mode 100644
index 0dcfc44..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-01.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$66(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$66(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds1) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.plan
deleted file mode 100644
index 7997aad..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-02.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$66(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$66(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds2.ds2) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$72(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds2.idx2) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.plan
deleted file mode 100644
index d1264cb..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-03.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$66(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$66(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds3) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.plan
deleted file mode 100644
index 3582cf3..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-04.plan
+++ /dev/null
@@ -1,12 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$21(ASC) ] |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds3) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.plan
deleted file mode 100644
index 6285f162..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-05.plan
+++ /dev/null
@@ -1,27 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$122(ASC), $$123(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$122(ASC), $$123(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds2.ds2) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$139(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds2.idx2) |PARTITIONED|
- -- BROADCAST_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds4) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.plan
deleted file mode 100644
index 510ccca..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-06.plan
+++ /dev/null
@@ -1,24 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$122(ASC), $$123(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$122(ASC), $$123(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$122][$$123] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$122] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds4) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$123] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds3) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.plan
deleted file mode 100644
index 1577585..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-07.plan
+++ /dev/null
@@ -1,24 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$122(ASC), $$123(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$122(ASC), $$123(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$122][$$123] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$122] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds4) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$123] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds1) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.plan
deleted file mode 100644
index 1577585..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-08.plan
+++ /dev/null
@@ -1,24 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$122(ASC), $$123(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$122(ASC), $$123(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$122][$$123] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$122] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds4) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$123] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds1) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.plan
deleted file mode 100644
index d60ee1e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-09.plan
+++ /dev/null
@@ -1,24 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$84(ASC), $$85(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$84(ASC), $$85(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$84][$$85] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$84] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds4) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$85] |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds2) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.plan
deleted file mode 100644
index 19fe8ce..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-10.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.idx5_dt_fmt) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.plan
deleted file mode 100644
index b636106..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-11.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.idx5_d_fmt) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.plan
deleted file mode 100644
index 382c39a..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-12.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.idx5_t_fmt) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.plan
deleted file mode 100644
index babda5c..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-13.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.ds6) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.idx6_dt) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.plan
deleted file mode 100644
index d55a9a2..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-14.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.ds6) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.idx6_d) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.plan
deleted file mode 100644
index 2799b48..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-15.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.ds6) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$59(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds6.idx6_t) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.plan
deleted file mode 100644
index 6291577..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-16.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.plan
deleted file mode 100644
index 8757f3e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-17.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds6) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.plan
deleted file mode 100644
index 6291577..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-18.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$56(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$56(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.plan
deleted file mode 100644
index cb86b13..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-19.plan
+++ /dev/null
@@ -1,27 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$110(ASC), $$111(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$110(ASC), $$111(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.ds5) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$123(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds5.idx5_dt_fmt) |PARTITIONED|
- -- BROADCAST_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds6) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.plan
deleted file mode 100644
index 885b6ba..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-20.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$65(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$65(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.ds7) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$70(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.idx2) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.plan
deleted file mode 100644
index a560c7f..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-21.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$65(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$65(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds7) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.plan
deleted file mode 100644
index a560c7f..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-22.plan
+++ /dev/null
@@ -1,16 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$65(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$65(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- DATASOURCE_SCAN (test.ds7) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.plan
deleted file mode 100644
index 88537b6..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-23.plan
+++ /dev/null
@@ -1,23 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$65(ASC) ] |PARTITIONED|
- -- STABLE_SORT [$$65(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.ds7) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$70(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.idx3) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.plan
deleted file mode 100644
index 85d3144..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results/btree-index-selection/cast-default-null-correlated/cast-default-null-correlated-24.plan
+++ /dev/null
@@ -1,19 +0,0 @@
--- DISTRIBUTE_RESULT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- SORT_MERGE_EXCHANGE [$$20(ASC) ] |PARTITIONED|
- -- STREAM_SELECT |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.ds7) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$25(ASC)] |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STREAM_PROJECT |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- BTREE_SEARCH (test.ds7.idx1) |PARTITIONED|
- -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- ASSIGN |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.000.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.000.ddl.sqlpp
deleted file mode 100644
index 2b2b1e5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.000.ddl.sqlpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Description : test that CAST (DEFAULT NULL) casts to the target type such that NULL is produced for invalid input
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-CREATE TYPE t1 AS { id: int, s_f: string, d_f: double, i_f: int, b_f: boolean };
-CREATE TYPE t2 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds1(t1) PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds2(t1) PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds3(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds5(t2) PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX ds2_o_idx1 ON ds2(o_s_f: int, o_i_f: string) INCLUDE UNKNOWN KEY CAST (DEFAULT NULL);
-CREATE INDEX ds2_o_idx2 ON ds2(o_s_f: double, o_d_f: string) CAST (DEFAULT NULL);
-
-CREATE INDEX ds2_o_idx4 ON ds2(a.s_f: int) CAST (DEFAULT NULL);
-
-CREATE INDEX ds2_o_idx5 ON ds2(a.any_f: int) CAST (DEFAULT NULL);
-CREATE INDEX ds2_o_idx6 ON ds2(a.any_f: string) CAST (DEFAULT NULL);
-CREATE INDEX ds2_o_idx7 ON ds2(a.any_f: double) CAST (DEFAULT NULL);
-
-// temporal
-CREATE INDEX ds3_o_idx_f_dt ON ds3(f_dt: datetime) CAST (DEFAULT NULL);
-CREATE INDEX ds3_o_idx_f_d ON ds3(f_d: date) CAST (DEFAULT NULL);
-CREATE INDEX ds3_o_idx_f_t ON ds3(f_t: time) CAST (DEFAULT NULL);
-
-// temporal with format
-CREATE INDEX ds3_o_idx_f_dt_fmt ON ds3(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna');
-CREATE INDEX ds3_o_idx_f_d_fmt ON ds3(f_d_fmt: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
-CREATE INDEX ds3_o_idx_f_t_fmt ON ds3(f_t_fmt: time) CAST (DEFAULT NULL time 'hh:mm:ss.nnna');
-
-CREATE INDEX ds3_o_idx_invalid_fmt ON ds3(f_d_fmt: date) CAST (DEFAULT NULL date 'invalid_format');
-
-// on closed fields
-CREATE INDEX idx1 ON ds5(s_f1);
-CREATE INDEX idx2 ON ds5(s_f1: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds5(s_f1: int) CAST (DEFAULT NULL);
-
-CREATE INDEX idx4 ON ds5(s_f2);
-CREATE INDEX idx5 ON ds5(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx6 ON ds5(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE INDEX idx7 ON ds5(i_f: int) CAST (DEFAULT NULL);
-CREATE INDEX idx8 ON ds5(i_f: string) CAST (DEFAULT NULL);
-
-CREATE INDEX idx_exc1 ON ds5(s_f2: int) EXCLUDE UNKNOWN KEY CAST (DEFAULT NULL);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.001.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.001.update.sqlpp
deleted file mode 100644
index fac0b31..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.001.update.sqlpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-INSERT INTO ds1 [
-{"id": 1, "s_f": "s", "d_f": 1.5, "i_f": 1, "b_f": true, "o_s_f": "s", "o_d_f": 1.5, "o_i_f": 1, "o_b_f": true, "a": {"s_f": "s", "any_f": 1}},
-{"id": 2, "s_f": "2", "d_f": 2.5, "i_f": 2, "b_f": false, "o_s_f": "2", "o_d_f": 2.5, "o_i_f": 2, "o_b_f": false, "a": {"s_f": "2", "any_f": 1.5}},
-{"id": 3, "s_f": "3.5", "d_f": 3.5, "i_f": 3, "b_f": true, "o_s_f": "3.5", "o_d_f": 3.5, "o_i_f": 3, "o_b_f": true, "a": {"s_f": "3.5", "any_f": "1"}},
-{"id": 4, "s_f": "true", "d_f": 4.5, "i_f": 4, "b_f": false, "o_s_f": "true", "o_d_f": 4.5, "o_i_f": 4, "o_b_f": false, "a": {"s_f": "true", "any_f": "1.5"}},
-{"id": 5, "s_f": "false", "d_f": 5.5, "i_f": 5, "b_f": false, "o_s_f": "false", "o_d_f": 5.5, "o_i_f": 5, "o_b_f": false, "a": {"s_f": "false", "any_f": "str"}},
-{"id": 6, "s_f": "6", "d_f": 6.5, "i_f": 6, "b_f": false, "o_s_f": "6", "o_d_f": 6.5, "o_i_f": 6, "o_b_f": false, "a": {"s_f": "6", "any_f": true}},
-{"id": 7, "s_f": "7.5", "d_f": 7.5, "i_f": 7, "b_f": false, "o_s_f": "7.5", "o_d_f": 7.5, "o_i_f": 7, "o_b_f": false, "a": {"s_f": "7.5", "any_f": false}},
-{"id": 8, "s_f": "false", "d_f": 8.5, "i_f": 8, "b_f": false, "o_s_f": "false", "o_d_f": 8.5, "o_i_f": 8, "o_b_f": false, "a": {"s_f": "false", "any_f": [1,2]}},
-{"id": 9, "s_f": "false", "d_f": 9.5, "i_f": 9, "b_f": false}
-];
-
-INSERT INTO ds2 [
-{"id": 1, "s_f": "s", "d_f": 1.5, "i_f": 1, "b_f": true, "o_s_f": "s", "o_d_f": 1.5, "o_i_f": 1, "o_b_f": true, "a": {"s_f": "s", "any_f": 1}},
-{"id": 2, "s_f": "2", "d_f": 2.5, "i_f": 2, "b_f": false, "o_s_f": "2", "o_d_f": 2.5, "o_i_f": 2, "o_b_f": false, "a": {"s_f": "2", "any_f": 1.5}},
-{"id": 3, "s_f": "3.5", "d_f": 3.5, "i_f": 3, "b_f": true, "o_s_f": "3.5", "o_d_f": 3.5, "o_i_f": 3, "o_b_f": true, "a": {"s_f": "3.5", "any_f": "1"}},
-{"id": 4, "s_f": "true", "d_f": 4.5, "i_f": 4, "b_f": false, "o_s_f": "true", "o_d_f": 4.5, "o_i_f": 4, "o_b_f": false, "a": {"s_f": "true", "any_f": "1.5"}},
-{"id": 5, "s_f": "false", "d_f": 5.5, "i_f": 5, "b_f": false, "o_s_f": "false", "o_d_f": 5.5, "o_i_f": 5, "o_b_f": false, "a": {"s_f": "false", "any_f": "str"}},
-{"id": 6, "s_f": "6", "d_f": 6.5, "i_f": 6, "b_f": false, "o_s_f": "6", "o_d_f": 6.5, "o_i_f": 6, "o_b_f": false, "a": {"s_f": "6", "any_f": true}},
-{"id": 7, "s_f": "7.5", "d_f": 7.5, "i_f": 7, "b_f": false, "o_s_f": "7.5", "o_d_f": 7.5, "o_i_f": 7, "o_b_f": false, "a": {"s_f": "7.5", "any_f": false}},
-{"id": 8, "s_f": "false", "d_f": 8.5, "i_f": 8, "b_f": false, "o_s_f": "false", "o_d_f": 8.5, "o_i_f": 8, "o_b_f": false, "a": {"s_f": "false", "any_f": [1,2]}},
-{"id": 9, "s_f": "false", "d_f": 9.5, "i_f": 9, "b_f": false}
-];
-
-INSERT INTO ds3 [
-{"id": 1, 'f_dt':'2020-02-20T01:40:41.001', 'f_d':'2020-02-20', 'f_t':'01:40:41.001', 'f_dt_fmt':'02/20/2020 01:40:41.001am', 'f_d_fmt':'02/20/2020', 'f_t_fmt':'01:40:41.001am'},
-{"id": 2, 'f_dt':'2021-11-25T22:12:51.999', 'f_d':'2021-11-25', 'f_t':'22:12:51.999', 'f_dt_fmt':'11/25/2021 10:12:51.999pm', 'f_d_fmt':'11/25/2021', 'f_t_fmt':'10:12:51.999pm'},
-/* Invalid value */
-{"id": 3, 'f_dt':'a', 'f_d':'b', 'f_t':'c', 'f_dt_fmt':'a', 'c_date':'b', 'f_t_fmt':'c'},
-{"id": 4, 'f_dt':'2019-01-20T14:40:41.001', 'f_d':'2019-01-20', 'f_t':'14:40:41.001', 'f_dt_fmt':'01/20/2019 02:40:41.001pm', 'f_d_fmt':'01/20/2019', 'f_t_fmt':'02:40:41.001pm'},
-{"id": 5, 'f_dt':null, 'f_d':null, 'f_t':null, 'f_dt_fmt':null, 'f_d_fmt':null, 'f_t_fmt':null},
-{"id": 6}
-];
-
-INSERT INTO ds4 [
-{"id": 1, 'f_dt':'2020-02-20T01:40:41.001', 'f_d':'2020-02-20', 'f_t':'01:40:41.001', 'f_dt_fmt':'02/20/2020 01:40:41.001am', 'f_d_fmt':'02/20/2020', 'f_t_fmt':'01:40:41.001am'},
-{"id": 2, 'f_dt':'2021-11-25T22:12:51.999', 'f_d':'2021-11-25', 'f_t':'22:12:51.999', 'f_dt_fmt':'11/25/2021 10:12:51.999pm', 'f_d_fmt':'11/25/2021', 'f_t_fmt':'10:12:51.999pm'},
-/* Invalid value */
-{"id": 3, 'f_dt':'a', 'f_d':'b', 'f_t':'c', 'f_dt_fmt':'a', 'c_date':'b', 'f_t_fmt':'c'},
-{"id": 4, 'f_dt':'2019-01-20T14:40:41.001', 'f_d':'2019-01-20', 'f_t':'14:40:41.001', 'f_dt_fmt':'01/20/2019 02:40:41.001pm', 'f_d_fmt':'01/20/2019', 'f_t_fmt':'02:40:41.001pm'},
-{"id": 5, 'f_dt':null, 'f_d':null, 'f_t':null, 'f_dt_fmt':null, 'f_d_fmt':null, 'f_t_fmt':null},
-{"id": 6}
-];
-
-INSERT INTO ds5 [
-{"id": 1, "s_f1": "s", "s_f2": "s", "i_f": 1 },
-{"id": 2, "s_f1": "2", "s_f2": "2", "i_f": 2 },
-{"id": 3, "s_f1": "3.5", "s_f2": "3.5", "i_f": 3 },
-{"id": 4, "s_f1": "4", "s_f2": "4", "i_f": 4 },
-{"id": 5, "s_f1": "5", "s_f2": null, "i_f": null },
-{"id": 6, "s_f1": "" }
-];
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.002.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.002.ddl.sqlpp
deleted file mode 100644
index 8ddbebc..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.002.ddl.sqlpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
- * Description : tests the bulk load path of CREATE INDEX
- */
-
-USE test;
-
-CREATE INDEX ds1_o_idx1 ON ds1(o_s_f: int, o_i_f: string) INCLUDE UNKNOWN KEY CAST(DEFAULT NULL);
-CREATE INDEX ds1_o_idx2 ON ds1(o_s_f: double, o_d_f: string) CAST(DEFAULT NULL);
-
-CREATE INDEX ds1_o_idx4 ON ds1(a.s_f: int) CAST(DEFAULT NULL);
-
-CREATE INDEX ds1_o_idx5 ON ds1(a.any_f: int) CAST(DEFAULT NULL);
-CREATE INDEX ds1_o_idx6 ON ds1(a.any_f: string) CAST(DEFAULT NULL);
-CREATE INDEX ds1_o_idx7 ON ds1(a.any_f: double) CAST(DEFAULT NULL);
-
-// temporal
-CREATE INDEX ds4_o_idx_f_dt ON ds4(f_dt: datetime) CAST (DEFAULT NULL);
-CREATE INDEX ds4_o_idx_f_d ON ds4(f_d: date) CAST (DEFAULT NULL);
-CREATE INDEX ds4_o_idx_f_t ON ds4(f_t: time) CAST (DEFAULT NULL);
-
-// temporal with format
-CREATE INDEX ds4_o_idx_f_dt_fmt ON ds4(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna');
-CREATE INDEX ds4_o_idx_f_d_fmt ON ds4(f_d_fmt: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
-CREATE INDEX ds4_o_idx_f_t_fmt ON ds4(f_t_fmt: time) CAST (DEFAULT NULL time 'hh:mm:ss.nnna');
-
-CREATE INDEX ds4_o_idx_invalid_fmt ON ds4(f_d_fmt: date) CAST (DEFAULT NULL date 'invalid_format');
-
-// on closed fields
-CREATE INDEX idx9 ON ds5(s_f1);
-CREATE INDEX idx10 ON ds5(s_f1: string) CAST (DEFAULT NULL);
-CREATE INDEX idx11 ON ds5(s_f1: int) CAST (DEFAULT NULL);
-
-CREATE INDEX idx12 ON ds5(s_f2);
-CREATE INDEX idx13 ON ds5(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx14 ON ds5(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE INDEX idx15 ON ds5(i_f: int) CAST (DEFAULT NULL);
-CREATE INDEX idx16 ON ds5(i_f: string) CAST (DEFAULT NULL);
-
-CREATE INDEX idx_exc2 ON ds5(s_f2: int) EXCLUDE UNKNOWN KEY CAST (DEFAULT NULL);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.003.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.003.query.sqlpp
deleted file mode 100644
index 3106b2f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.003.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx1") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.004.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.004.query.sqlpp
deleted file mode 100644
index 31e5fcd..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.004.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx2") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.005.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.005.query.sqlpp
deleted file mode 100644
index 1dee7d4..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.005.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx4") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.006.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.006.query.sqlpp
deleted file mode 100644
index 6401d91..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.006.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx5") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.007.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.007.query.sqlpp
deleted file mode 100644
index 12cc91f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.007.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx6") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.008.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.008.query.sqlpp
deleted file mode 100644
index ee605f3..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.008.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds2", "ds2_o_idx7") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.009.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.009.query.sqlpp
deleted file mode 100644
index 7f0ddee..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.009.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx1") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.010.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.010.query.sqlpp
deleted file mode 100644
index afa0afa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.010.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx2") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.011.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.011.query.sqlpp
deleted file mode 100644
index db14e84..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.011.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx4") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.012.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.012.query.sqlpp
deleted file mode 100644
index d7d6246..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.012.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx5") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.013.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.013.query.sqlpp
deleted file mode 100644
index c072a76..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.013.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx6") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.014.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.014.query.sqlpp
deleted file mode 100644
index 086720b..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.014.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds1", "ds1_o_idx7") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.015.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.015.query.sqlpp
deleted file mode 100644
index e3c5f25..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.015.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// check the index metadata
-USE test;
-
-FROM Metadata.`Index` v WHERE v.DatasetName = 'ds2' AND v.IndexName = 'ds2_o_idx2' SELECT VALUE v;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.016.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.016.query.sqlpp
deleted file mode 100644
index 8881cb6..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.016.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_d_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.017.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.017.query.sqlpp
deleted file mode 100644
index 558f3b4..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.017.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_t_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.018.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.018.query.sqlpp
deleted file mode 100644
index bf99064..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.018.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_dt_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.019.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.019.query.sqlpp
deleted file mode 100644
index c37d984..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.019.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_d") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.020.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.020.query.sqlpp
deleted file mode 100644
index e901b04..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.020.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_t") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.021.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.021.query.sqlpp
deleted file mode 100644
index 151d016..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.021.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_f_dt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.022.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.022.query.sqlpp
deleted file mode 100644
index 3fcff2d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.022.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds3", "ds3_o_idx_invalid_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.023.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.023.query.sqlpp
deleted file mode 100644
index 2c6339d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.023.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_d_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.024.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.024.query.sqlpp
deleted file mode 100644
index be5e2ee..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.024.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_t_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.025.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.025.query.sqlpp
deleted file mode 100644
index 99551de..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.025.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_dt_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.026.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.026.query.sqlpp
deleted file mode 100644
index 7f407ca..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.026.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_d") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.027.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.027.query.sqlpp
deleted file mode 100644
index d75187f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.027.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_t") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.028.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.028.query.sqlpp
deleted file mode 100644
index 6f2eb21..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.028.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_f_dt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.029.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.029.query.sqlpp
deleted file mode 100644
index e4d5557..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.029.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds4", "ds4_o_idx_invalid_fmt") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.030.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.030.query.sqlpp
deleted file mode 100644
index aeaffe8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.030.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// check the index metadata
-USE test;
-
-FROM Metadata.`Index` v
-WHERE v.DatasetName = 'ds3' AND v.IsPrimary = false
-SELECT v.IndexName, v.`Cast`
-ORDER BY v.IndexName;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.031.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.031.query.sqlpp
deleted file mode 100644
index 437de9c..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.031.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// check the index metadata
-USE test;
-
-FROM Metadata.`Index` v
-WHERE v.DatasetName = 'ds4' AND v.IsPrimary = false
-SELECT v.IndexName, v.`Cast`
-ORDER BY v.IndexName;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.032.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.032.query.sqlpp
deleted file mode 100644
index 13b56e6..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.032.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx1") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.033.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.033.query.sqlpp
deleted file mode 100644
index 4e3ea15..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.033.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx2") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.034.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.034.query.sqlpp
deleted file mode 100644
index 43bd912..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.034.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx3") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.035.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.035.query.sqlpp
deleted file mode 100644
index 3129e17..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.035.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx4") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.036.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.036.query.sqlpp
deleted file mode 100644
index 7dac7ba..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.036.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx5") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.037.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.037.query.sqlpp
deleted file mode 100644
index 442e4c8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.037.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx6") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.038.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.038.query.sqlpp
deleted file mode 100644
index 0e16524..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.038.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx7") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.039.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.039.query.sqlpp
deleted file mode 100644
index 73bcd31..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.039.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx8") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.040.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.040.query.sqlpp
deleted file mode 100644
index b8683cd..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.040.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx9") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.041.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.041.query.sqlpp
deleted file mode 100644
index a694667..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.041.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx10") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.042.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.042.query.sqlpp
deleted file mode 100644
index ba593c5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.042.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx11") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.043.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.043.query.sqlpp
deleted file mode 100644
index c5931ab..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.043.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx12") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.044.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.044.query.sqlpp
deleted file mode 100644
index d168fb3..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.044.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx13") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.045.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.045.query.sqlpp
deleted file mode 100644
index 090b384..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.045.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx14") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.046.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.046.query.sqlpp
deleted file mode 100644
index 1d66487..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.046.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx15") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.047.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.047.query.sqlpp
deleted file mode 100644
index b6455d1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.047.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx16") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.048.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.048.query.sqlpp
deleted file mode 100644
index e551576..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.048.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx_exc1") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.049.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.049.query.sqlpp
deleted file mode 100644
index 6046ab4..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.049.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SET `import-private-functions` `true`;
-FROM DUMP_INDEX("test", "ds5", "idx_exc2") AS v
-SELECT VALUE v
-ORDER BY v.values;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.050.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.050.query.sqlpp
deleted file mode 100644
index cc547f8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.050.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-FROM Metadata.`Index` v
-WHERE v.DatasetName = 'ds5' AND v.IsPrimary = false
-SELECT v.IndexName, v.SearchKey, v.SearchKeyType, v.`Cast`
-ORDER BY v.IndexName;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.999.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.999.ddl.sqlpp
deleted file mode 100644
index 86a1b59..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null-correlated/index-cast-null-correlated.999.ddl.sqlpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null/index-cast-null.000.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null/index-cast-null.000.ddl.sqlpp
index e015377..5de3a72 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null/index-cast-null.000.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/index-cast-null/index-cast-null.000.ddl.sqlpp
@@ -25,11 +25,11 @@
USE test;
CREATE TYPE t1 AS { id: int, s_f: string, d_f: double, i_f: int, b_f: boolean };
CREATE TYPE t2 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds1(t1) PRIMARY KEY id;
-CREATE DATASET ds2(t1) PRIMARY KEY id;
-CREATE DATASET ds3(id int not unknown) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds5(t2) PRIMARY KEY id;
+CREATE DATASET ds1(t1) PRIMARY KEY id %with%;
+CREATE DATASET ds2(t1) PRIMARY KEY id %with%;
+CREATE DATASET ds3(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds5(t2) PRIMARY KEY id %with%;
CREATE INDEX ds2_o_idx1 ON ds2(o_s_f: int, o_i_f: string) INCLUDE UNKNOWN KEY CAST (DEFAULT NULL);
CREATE INDEX ds2_o_idx2 ON ds2(o_s_f: double, o_d_f: string) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.01.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.01.ddl.sqlpp
deleted file mode 100644
index 89325d7..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.01.ddl.sqlpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-DROP DATAVERSE test IF EXISTS;
-CREATE DATAVERSE test;
-USE test;
-
-CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-CREATE DATASET ds7(t1) PRIMARY KEY id WITH {"merge-policy": {"name": "correlated-prefix","parameters": { "max-mergable-component-size": 16384, "max-tolerance-component-count": 3 }}};
-
-CREATE INDEX idx1 ON ds1(x: int);
-CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds3(x: int) CAST (DEFAULT NULL);
-
-CREATE INDEX idx5_dt_fmt ON ds5(f_dt_fmt: datetime) CAST (DEFAULT NULL datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY');
-CREATE INDEX idx5_d_fmt ON ds5(f_d_fmt: date) CAST (DEFAULT NULL date 'MM/DD/YYYY');
-CREATE INDEX idx5_t_fmt ON ds5(f_t_fmt: time) CAST (DEFAULT NULL time 'hh:mm:ss.nnna');
-
-CREATE INDEX idx6_dt ON ds6(f_dt: datetime) CAST (DEFAULT NULL);
-CREATE INDEX idx6_d ON ds6(f_d: date) CAST (DEFAULT NULL);
-CREATE INDEX idx6_t ON ds6(f_t: time) CAST (DEFAULT NULL);
-
-CREATE INDEX idx1 ON ds7(s_f2);
-CREATE INDEX idx2 ON ds7(s_f2: string) CAST (DEFAULT NULL);
-CREATE INDEX idx3 ON ds7(s_f2: int) CAST (DEFAULT NULL);
-
-CREATE VIEW view1(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds1;
-CREATE VIEW view2(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds2;
-CREATE VIEW view3(id int, x string, y int) DEFAULT NULL AS SELECT id, x, y FROM ds3;
-CREATE VIEW view4(id int, x int, y int) DEFAULT NULL AS SELECT id, x, y FROM ds4;
-
-CREATE VIEW view5_dt_fmt(id int, f_dt_fmt datetime) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_dt_fmt FROM ds5;
-
-CREATE VIEW view5_d_fmt(id int, f_d_fmt date) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_d_fmt FROM ds5;
-
-CREATE VIEW view5_t_fmt(id int, f_t_fmt time) DEFAULT NULL
-datetime 'MM/DD/YYYY hh:mm:ss.nnna' date 'MM/DD/YYYY' time 'hh:mm:ss.nnna' AS SELECT id, f_t_fmt FROM ds5;
-
-CREATE VIEW view6_dt(id int, f_dt datetime) DEFAULT NULL AS SELECT id, f_dt FROM ds6;
-CREATE VIEW view6_d(id int, f_d date) DEFAULT NULL AS SELECT id, f_d FROM ds6;
-CREATE VIEW view6_t(id int, f_t time) DEFAULT NULL AS SELECT id, f_t FROM ds6;
-
-CREATE VIEW view7_1(id int, s_f2 string, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
-CREATE VIEW view7_2(id int, s_f2 int, i_f int) DEFAULT NULL AS SELECT id, s_f2, i_f FROM ds7;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.02.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.02.update.sqlpp
deleted file mode 100644
index 1a51639..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.02.update.sqlpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-INSERT INTO ds1 [
-{"id": 1, "a": "s1", "b": 1, "x": 1, "y": 2},
-{"id": 2, "a": "s2", "b": 2, "x": 2, "y": 1},
-{"id": 3, "a": "s3", "b": 3, "x": 1.1, "y": 2.1},
-{"id": 4, "a": "s4", "b": 4, "x": 2.1, "y": 1.1},
-{"id": 5, "a": "s5", "b": 5, "y": 1.1},
-{"id": 6, "a": "s6", "b": 6, "x": 3, "y": 3}
-];
-
-INSERT INTO ds2 [
-{"id": 1, "a": "s1", "b": 1, "x": 1, "y": 2},
-{"id": 2, "a": "s2", "b": 2, "x": 2, "y": 1},
-{"id": 3, "a": "s3", "b": 3, "x": 1.1, "y": 2.1},
-{"id": 4, "a": "s4", "b": 4, "x": 2.1, "y": 1.1},
-{"id": 5, "a": "s5", "b": 5, "y": 1.1},
-{"id": 6, "a": "s6", "b": 6, "x": 33, "y": 3}
-];
-
-INSERT INTO ds3 [
-{"id": 1, "a": "s1", "b": 1, "x": 1, "y": 2},
-{"id": 2, "a": "s2", "b": 2, "x": 2, "y": 1},
-{"id": 3, "a": "s3", "b": 3, "x": 1.1, "y": 2.1},
-{"id": 4, "a": "s4", "b": 4, "x": 2.1, "y": 1.1},
-{"id": 5, "a": "s5", "b": 5, "y": 1.1},
-{"id": 6, "a": "s6", "b": 6, "x": 333, "y": 3}
-];
-
-INSERT INTO ds4 [
-{"id": 1, "a": "s1", "b": 1, "x": 1, "y": 2},
-{"id": 2, "a": "s2", "b": 2, "x": 2, "y": 1},
-{"id": 3, "a": "s3", "b": 3, "x": 1.1, "y": 2.1},
-{"id": 4, "a": "s4", "b": 4, "x": 2.1, "y": 1.1},
-{"id": 5, "a": "s5", "b": 5, "y": 1.1},
-{"id": 6, "a": "s6", "b": 6, "x": 3333, "y": 3}
-];
-
-INSERT INTO ds5 [
-{"id": 1, 'f_dt_fmt':'02/20/2020 01:40:41.001am', 'f_d_fmt':'02/20/2020', 'f_t_fmt':'01:40:41.001am'},
-{"id": 2, 'f_dt_fmt':'11/25/2021 10:12:51.999pm', 'f_d_fmt':'11/25/2021', 'f_t_fmt':'10:12:51.999pm'},
-/* Invalid value */
-{"id": 3, 'f_dt_fmt':'a', 'c_date':'b', 'f_t_fmt':'c'},
-{"id": 4, 'f_dt_fmt':'01/20/2019 02:40:41.001pm', 'f_d_fmt':'01/20/2019', 'f_t_fmt':'02:40:41.001pm'},
-{"id": 5, 'f_dt_fmt':null, 'f_d_fmt':null, 'f_t_fmt':null},
-{"id": 6}
-];
-
-INSERT INTO ds6 [
-{"id": 1, 'f_dt':'2020-02-20T01:40:41.001', 'f_d':'2020-02-20', 'f_t':'01:40:41.001'},
-{"id": 2, 'f_dt':'2021-11-25T22:12:51.999', 'f_d':'2021-11-25', 'f_t':'22:12:51.999'},
-/* Invalid value */
-{"id": 3, 'f_dt':'a', 'f_d':'b', 'f_t':'c'},
-{"id": 4, 'f_dt':'2019-01-20T14:40:41.001', 'f_d':'2019-01-20', 'f_t':'14:40:41.001'},
-{"id": 5, 'f_dt':null, 'f_d':null, 'f_t':null},
-{"id": 6}
-];
-
-INSERT INTO ds7 [
-{"id": 1, "s_f1": "s", "s_f2": "s", "i_f": 1 },
-{"id": 2, "s_f1": "2", "s_f2": "2", "i_f": 2 },
-{"id": 3, "s_f1": "3.5", "s_f2": "3.5", "i_f": 3 },
-{"id": 4, "s_f1": "4", "s_f2": "4", "i_f": 4 },
-{"id": 5, "s_f1": "5", "s_f2": null, "i_f": null },
-{"id": 6, "s_f1": "" }
-];
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.query.sqlpp
deleted file mode 100644
index 56ad29e..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx1 on x is not used since idx1 does not have the CAST modifier and the field x has cast
-SELECT id, x, y FROM view1 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.query.sqlpp
deleted file mode 100644
index f9db494..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx2 on x is used since idx2 has the CAST modifier and the field x has cast
-SELECT id, x, y FROM view2 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.query.sqlpp
deleted file mode 100644
index 5180871..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx3 on x is not used since idx3 has the CAST modifier on int and the field x has cast as string
-SELECT id, x, y FROM view3 WHERE x <= "1" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.query.sqlpp
deleted file mode 100644
index 9508ece..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx3 on x is not used since idx3 has the CAST modifier and the field x does not have cast
-SELECT id, x, y FROM ds3 WHERE x <= 1 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.query.sqlpp
deleted file mode 100644
index e5016c9..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.query.sqlpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx2 on view2(x) is used. both v4.x and v2.x are int and both v2.x and idx2 use int-default-null.
-SELECT v4.x AS v4x, v2.x AS v2x
-FROM view4 AS v4, view2 AS v2
-WHERE v4.x /*+ indexnl */ = v2.x ORDER BY v4x, v2x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.query.sqlpp
deleted file mode 100644
index 2242a50..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.query.sqlpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx3 on view3(x) is not used because v3.x uses string-default-null and idx3 uses int-default-null
-SELECT v4.x AS v4x, v3.x AS v3x
-FROM view4 AS v4, view3 AS v3
-WHERE v4.x /*+ indexnl */ = v3.x ORDER BY v4x, v3x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.query.sqlpp
deleted file mode 100644
index 5be7fc9..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.query.sqlpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx1 is not used because idx1 does not have CAST modifier (idx1 is just int and v1.x uses int-default-null).
-SELECT v4.x AS v4x, v1.x AS v1x
-FROM view4 AS v4, view1 AS v1
-WHERE v4.x /*+ indexnl */ = v1.x ORDER BY v4x, v1x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.query.sqlpp
deleted file mode 100644
index 5be7fc9..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.query.sqlpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx1 is not used because idx1 does not have CAST modifier (idx1 is just int and v1.x uses int-default-null).
-SELECT v4.x AS v4x, v1.x AS v1x
-FROM view4 AS v4, view1 AS v1
-WHERE v4.x /*+ indexnl */ = v1.x ORDER BY v4x, v1x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.query.sqlpp
deleted file mode 100644
index 59786c2..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.query.sqlpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// test that idx2 is not used because idx2 uses int-default-null and ds2.x is just int.
-SELECT v4.x AS v4x, ds2.x AS ds2x
-FROM view4 AS v4, ds2 AS ds2
-WHERE v4.x /*+ indexnl */ = ds2.x ORDER BY v4x, ds2x;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.query.sqlpp
deleted file mode 100644
index e47124a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view5_dt_fmt AS v
-WHERE v.f_dt_fmt < datetime('2020-12-20T00:00:00')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.query.sqlpp
deleted file mode 100644
index faae08d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view5_d_fmt AS v
-WHERE v.f_d_fmt < date('2020-12-20')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.query.sqlpp
deleted file mode 100644
index 3c775d9..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view5_t_fmt AS v
-WHERE v.f_t_fmt < time('18:13:03')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.query.sqlpp
deleted file mode 100644
index 7b88c3d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view6_dt AS v
-WHERE v.f_dt < datetime('2020-12-20T00:00:00')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.query.sqlpp
deleted file mode 100644
index 5871f2f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view6_d AS v
-WHERE v.f_d < date('2020-12-20')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.query.sqlpp
deleted file mode 100644
index 93f1c88..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-SELECT VALUE v
-FROM view6_t AS v
-WHERE v.f_t < time('18:13:03')
-ORDER BY v.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.query.sqlpp
deleted file mode 100644
index 29081f2..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.query.sqlpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-
-// testing that idx5_dt_fmt is used
-SELECT v6.f_dt AS v6f_dt, v5.f_dt_fmt AS v5f_dt_fmt
-FROM view6_dt AS v6, view5_dt_fmt AS v5
-WHERE v6.f_dt /*+ indexnl */ = v5.f_dt_fmt ORDER BY v6f_dt, v5f_dt_fmt;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.query.sqlpp
deleted file mode 100644
index e632e91..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// index idx2 should be used
-SELECT id, s_f2 FROM view7_1 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.query.sqlpp
deleted file mode 100644
index 56296e8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// no index is used (and no result is returned because of incompatible types. s_f2 string vs. 4 int)
-SELECT id, s_f2 FROM view7_1 WHERE s_f2 < 4 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.query.sqlpp
deleted file mode 100644
index 7e03ebf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// no index is used (and no result is returned because of incompatible types. s_f2 int vs. "4" string)
-SELECT id, s_f2 FROM view7_2 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.query.sqlpp
deleted file mode 100644
index f0eece2..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.query.sqlpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// index idx3 should be used
-SELECT id, s_f2 FROM view7_2 WHERE s_f2 < 4 ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.query.sqlpp
deleted file mode 100644
index 4fe0cae..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.query.sqlpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-USE test;
-// index idx1 should be used
-set `compiler.indexonly` "false"; // there is an issue with using index only plan where nulls/missings are included
-SELECT id, s_f2 FROM ds7 WHERE s_f2 < "4" ORDER BY id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null/cast-default-null.01.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null/cast-default-null.01.ddl.sqlpp
index 9cc8fdd..c454cea 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null/cast-default-null.01.ddl.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/index-selection/cast-default-null/cast-default-null.01.ddl.sqlpp
@@ -23,13 +23,13 @@
CREATE TYPE t1 AS { id: int, s_f1: string, s_f2: string?, i_f: int? };
-CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id;
-CREATE DATASET ds7(t1) PRIMARY KEY id;
+CREATE DATASET ds1(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds2(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds3(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds4(id int not unknown, a string, b int) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds5(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds6(id int not unknown) OPEN TYPE PRIMARY KEY id %with%;
+CREATE DATASET ds7(t1) PRIMARY KEY id %with%;
CREATE INDEX idx1 ON ds1(x: int);
CREATE INDEX idx2 ON ds2(x: int) CAST (DEFAULT NULL);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.003.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.003.adm
deleted file mode 100644
index e2aa8c8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.003.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, null, 9 ] }
-{ "values": [ null, "1", 1 ] }
-{ "values": [ null, "4", 4 ] }
-{ "values": [ null, "5", 5 ] }
-{ "values": [ null, "8", 8 ] }
-{ "values": [ 2, "2", 2 ] }
-{ "values": [ 3, "3", 3 ] }
-{ "values": [ 6, "6", 6 ] }
-{ "values": [ 7, "7", 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.004.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.004.adm
deleted file mode 100644
index cc2dc3f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.004.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, null, 9 ] }
-{ "values": [ null, "1.5", 1 ] }
-{ "values": [ null, "4.5", 4 ] }
-{ "values": [ null, "5.5", 5 ] }
-{ "values": [ null, "8.5", 8 ] }
-{ "values": [ 2.0, "2.5", 2 ] }
-{ "values": [ 3.5, "3.5", 3 ] }
-{ "values": [ 6.0, "6.5", 6 ] }
-{ "values": [ 7.5, "7.5", 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.005.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.005.adm
deleted file mode 100644
index 799cdcc..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.005.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 4 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 6, 6 ] }
-{ "values": [ 7, 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.006.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.006.adm
deleted file mode 100644
index 4ca6341..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.006.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 0, 7 ] }
-{ "values": [ 1, 1 ] }
-{ "values": [ 1, 2 ] }
-{ "values": [ 1, 3 ] }
-{ "values": [ 1, 4 ] }
-{ "values": [ 1, 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.007.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.007.adm
deleted file mode 100644
index b6cff8e..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.007.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ "1", 1 ] }
-{ "values": [ "1", 3 ] }
-{ "values": [ "1.5", 2 ] }
-{ "values": [ "1.5", 4 ] }
-{ "values": [ "false", 7 ] }
-{ "values": [ "str", 5 ] }
-{ "values": [ "true", 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.008.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.008.adm
deleted file mode 100644
index ec983bf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.008.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 0.0, 7 ] }
-{ "values": [ 1.0, 1 ] }
-{ "values": [ 1.0, 3 ] }
-{ "values": [ 1.0, 6 ] }
-{ "values": [ 1.5, 2 ] }
-{ "values": [ 1.5, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.009.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.009.adm
deleted file mode 100644
index e2aa8c8..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.009.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, null, 9 ] }
-{ "values": [ null, "1", 1 ] }
-{ "values": [ null, "4", 4 ] }
-{ "values": [ null, "5", 5 ] }
-{ "values": [ null, "8", 8 ] }
-{ "values": [ 2, "2", 2 ] }
-{ "values": [ 3, "3", 3 ] }
-{ "values": [ 6, "6", 6 ] }
-{ "values": [ 7, "7", 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.010.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.010.adm
deleted file mode 100644
index cc2dc3f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.010.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, null, 9 ] }
-{ "values": [ null, "1.5", 1 ] }
-{ "values": [ null, "4.5", 4 ] }
-{ "values": [ null, "5.5", 5 ] }
-{ "values": [ null, "8.5", 8 ] }
-{ "values": [ 2.0, "2.5", 2 ] }
-{ "values": [ 3.5, "3.5", 3 ] }
-{ "values": [ 6.0, "6.5", 6 ] }
-{ "values": [ 7.5, "7.5", 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.011.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.011.adm
deleted file mode 100644
index 799cdcc..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.011.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 4 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 6, 6 ] }
-{ "values": [ 7, 7 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.012.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.012.adm
deleted file mode 100644
index 4ca6341..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.012.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 0, 7 ] }
-{ "values": [ 1, 1 ] }
-{ "values": [ 1, 2 ] }
-{ "values": [ 1, 3 ] }
-{ "values": [ 1, 4 ] }
-{ "values": [ 1, 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.013.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.013.adm
deleted file mode 100644
index b6cff8e..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.013.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ "1", 1 ] }
-{ "values": [ "1", 3 ] }
-{ "values": [ "1.5", 2 ] }
-{ "values": [ "1.5", 4 ] }
-{ "values": [ "false", 7 ] }
-{ "values": [ "str", 5 ] }
-{ "values": [ "true", 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.014.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.014.adm
deleted file mode 100644
index ec983bf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.014.adm
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 8 ] }
-{ "values": [ null, 9 ] }
-{ "values": [ 0.0, 7 ] }
-{ "values": [ 1.0, 1 ] }
-{ "values": [ 1.0, 3 ] }
-{ "values": [ 1.0, 6 ] }
-{ "values": [ 1.5, 2 ] }
-{ "values": [ 1.5, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.015.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.015.adm
deleted file mode 100644
index 6080d55..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.015.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "DataverseName": "test", "DatasetName": "ds2", "IndexName": "ds2_o_idx2", "IndexStructure": "BTREE", "SearchKey": [ [ "o_s_f" ], [ "o_d_f" ] ], "IsPrimary": false, "Timestamp": "Sun Oct 31 17:55:11 PDT 2021", "PendingOp": 0, "SearchKeyType": [ "double", "string" ], "ExcludeUnknownKey": false, "Cast": { "Default": null } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.016.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.016.adm
deleted file mode 100644
index 77ce9ac..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.016.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "date: { 2019-01-20 }", 4 ] }
-{ "values": [ "date: { 2020-02-20 }", 1 ] }
-{ "values": [ "date: { 2021-11-25 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.017.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.017.adm
deleted file mode 100644
index 38633f5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.017.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "time: { 01:40:41.001 }", 1 ] }
-{ "values": [ "time: { 14:40:41.001 }", 4 ] }
-{ "values": [ "time: { 22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.018.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.018.adm
deleted file mode 100644
index 8b9d5df..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.018.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "datetime: { 2019-01-20T14:40:41.001 }", 4 ] }
-{ "values": [ "datetime: { 2020-02-20T01:40:41.001 }", 1 ] }
-{ "values": [ "datetime: { 2021-11-25T22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.019.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.019.adm
deleted file mode 100644
index 77ce9ac..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.019.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "date: { 2019-01-20 }", 4 ] }
-{ "values": [ "date: { 2020-02-20 }", 1 ] }
-{ "values": [ "date: { 2021-11-25 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.020.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.020.adm
deleted file mode 100644
index 38633f5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.020.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "time: { 01:40:41.001 }", 1 ] }
-{ "values": [ "time: { 14:40:41.001 }", 4 ] }
-{ "values": [ "time: { 22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.021.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.021.adm
deleted file mode 100644
index 8b9d5df..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.021.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "datetime: { 2019-01-20T14:40:41.001 }", 4 ] }
-{ "values": [ "datetime: { 2020-02-20T01:40:41.001 }", 1 ] }
-{ "values": [ "datetime: { 2021-11-25T22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.022.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.022.adm
deleted file mode 100644
index fe93409..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.022.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 2 ] }
-{ "values": [ null, 3 ] }
-{ "values": [ null, 4 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.023.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.023.adm
deleted file mode 100644
index 77ce9ac..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.023.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "date: { 2019-01-20 }", 4 ] }
-{ "values": [ "date: { 2020-02-20 }", 1 ] }
-{ "values": [ "date: { 2021-11-25 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.024.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.024.adm
deleted file mode 100644
index 38633f5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.024.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "time: { 01:40:41.001 }", 1 ] }
-{ "values": [ "time: { 14:40:41.001 }", 4 ] }
-{ "values": [ "time: { 22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.025.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.025.adm
deleted file mode 100644
index 8b9d5df..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.025.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "datetime: { 2019-01-20T14:40:41.001 }", 4 ] }
-{ "values": [ "datetime: { 2020-02-20T01:40:41.001 }", 1 ] }
-{ "values": [ "datetime: { 2021-11-25T22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.026.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.026.adm
deleted file mode 100644
index 77ce9ac..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.026.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "date: { 2019-01-20 }", 4 ] }
-{ "values": [ "date: { 2020-02-20 }", 1 ] }
-{ "values": [ "date: { 2021-11-25 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.027.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.027.adm
deleted file mode 100644
index 38633f5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.027.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "time: { 01:40:41.001 }", 1 ] }
-{ "values": [ "time: { 14:40:41.001 }", 4 ] }
-{ "values": [ "time: { 22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.028.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.028.adm
deleted file mode 100644
index 8b9d5df..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.028.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 3 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "datetime: { 2019-01-20T14:40:41.001 }", 4 ] }
-{ "values": [ "datetime: { 2020-02-20T01:40:41.001 }", 1 ] }
-{ "values": [ "datetime: { 2021-11-25T22:12:51.999 }", 2 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.029.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.029.adm
deleted file mode 100644
index fe93409..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.029.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 2 ] }
-{ "values": [ null, 3 ] }
-{ "values": [ null, 4 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.030.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.030.adm
deleted file mode 100644
index 0101b1d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.030.adm
+++ /dev/null
@@ -1,7 +0,0 @@
-{ "IndexName": "ds3_o_idx_f_d", "Cast": { "Default": null } }
-{ "IndexName": "ds3_o_idx_f_d_fmt", "Cast": { "Default": null, "DataFormat": [ null, "MM/DD/YYYY", null ] } }
-{ "IndexName": "ds3_o_idx_f_dt", "Cast": { "Default": null } }
-{ "IndexName": "ds3_o_idx_f_dt_fmt", "Cast": { "Default": null, "DataFormat": [ "MM/DD/YYYY hh:mm:ss.nnna", null, null ] } }
-{ "IndexName": "ds3_o_idx_f_t", "Cast": { "Default": null } }
-{ "IndexName": "ds3_o_idx_f_t_fmt", "Cast": { "Default": null, "DataFormat": [ null, null, "hh:mm:ss.nnna" ] } }
-{ "IndexName": "ds3_o_idx_invalid_fmt", "Cast": { "Default": null, "DataFormat": [ null, "invalid_format", null ] } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.031.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.031.adm
deleted file mode 100644
index a8f3fda..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.031.adm
+++ /dev/null
@@ -1,7 +0,0 @@
-{ "IndexName": "ds4_o_idx_f_d", "Cast": { "Default": null } }
-{ "IndexName": "ds4_o_idx_f_d_fmt", "Cast": { "Default": null, "DataFormat": [ null, "MM/DD/YYYY", null ] } }
-{ "IndexName": "ds4_o_idx_f_dt", "Cast": { "Default": null } }
-{ "IndexName": "ds4_o_idx_f_dt_fmt", "Cast": { "Default": null, "DataFormat": [ "MM/DD/YYYY hh:mm:ss.nnna", null, null ] } }
-{ "IndexName": "ds4_o_idx_f_t", "Cast": { "Default": null } }
-{ "IndexName": "ds4_o_idx_f_t_fmt", "Cast": { "Default": null, "DataFormat": [ null, null, "hh:mm:ss.nnna" ] } }
-{ "IndexName": "ds4_o_idx_invalid_fmt", "Cast": { "Default": null, "DataFormat": [ null, "invalid_format", null ] } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.032.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.032.adm
deleted file mode 100644
index 64cd5cf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.032.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ "", 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "5", 5 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.033.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.033.adm
deleted file mode 100644
index 64cd5cf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.033.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ "", 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "5", 5 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.034.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.034.adm
deleted file mode 100644
index 1674d82..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.034.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ 0, 6 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
-{ "values": [ 5, 5 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.035.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.035.adm
deleted file mode 100644
index 97e4e83..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.035.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.036.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.036.adm
deleted file mode 100644
index feca349..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.036.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.037.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.037.adm
deleted file mode 100644
index 8d8fe2a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.037.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.038.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.038.adm
deleted file mode 100644
index f03683f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.038.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ 1, 1 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.039.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.039.adm
deleted file mode 100644
index 12f73b1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.039.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "1", 1 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3", 3 ] }
-{ "values": [ "4", 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.040.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.040.adm
deleted file mode 100644
index 64cd5cf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.040.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ "", 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "5", 5 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.041.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.041.adm
deleted file mode 100644
index 64cd5cf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.041.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ "", 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "5", 5 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.042.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.042.adm
deleted file mode 100644
index 1674d82..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.042.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ 0, 6 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
-{ "values": [ 5, 5 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.043.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.043.adm
deleted file mode 100644
index 97e4e83..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.043.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.044.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.044.adm
deleted file mode 100644
index feca349..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.044.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3.5", 3 ] }
-{ "values": [ "4", 4 ] }
-{ "values": [ "s", 1 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.045.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.045.adm
deleted file mode 100644
index 8d8fe2a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.045.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 1 ] }
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.046.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.046.adm
deleted file mode 100644
index f03683f..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.046.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ 1, 1 ] }
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.047.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.047.adm
deleted file mode 100644
index 12f73b1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.047.adm
+++ /dev/null
@@ -1,6 +0,0 @@
-{ "values": [ null, 5 ] }
-{ "values": [ null, 6 ] }
-{ "values": [ "1", 1 ] }
-{ "values": [ "2", 2 ] }
-{ "values": [ "3", 3 ] }
-{ "values": [ "4", 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.048.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.048.adm
deleted file mode 100644
index 086d8cb..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.048.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.049.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.049.adm
deleted file mode 100644
index 086d8cb..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.049.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "values": [ 2, 2 ] }
-{ "values": [ 3, 3 ] }
-{ "values": [ 4, 4 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.050.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.050.adm
deleted file mode 100644
index 99eb793..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/index-cast-null-correlated/index-cast-null-correlated.050.adm
+++ /dev/null
@@ -1,18 +0,0 @@
-{ "IndexName": "idx1", "SearchKey": [ [ "s_f1" ] ] }
-{ "IndexName": "idx10", "SearchKey": [ [ "s_f1" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx11", "SearchKey": [ [ "s_f1" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx12", "SearchKey": [ [ "s_f2" ] ] }
-{ "IndexName": "idx13", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx14", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx15", "SearchKey": [ [ "i_f" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx16", "SearchKey": [ [ "i_f" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx2", "SearchKey": [ [ "s_f1" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx3", "SearchKey": [ [ "s_f1" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx4", "SearchKey": [ [ "s_f2" ] ] }
-{ "IndexName": "idx5", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx6", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx7", "SearchKey": [ [ "i_f" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx8", "SearchKey": [ [ "i_f" ] ], "SearchKeyType": [ "string" ], "Cast": { "Default": null } }
-{ "IndexName": "idx9", "SearchKey": [ [ "s_f1" ] ] }
-{ "IndexName": "idx_exc1", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
-{ "IndexName": "idx_exc2", "SearchKey": [ [ "s_f2" ] ], "SearchKeyType": [ "int64" ], "Cast": { "Default": null } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.adm
deleted file mode 100644
index 6b56041..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.03.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "x": 1, "y": 2 }
-{ "id": 3, "x": 1, "y": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.adm
deleted file mode 100644
index 6b56041..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.04.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "x": 1, "y": 2 }
-{ "id": 3, "x": 1, "y": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.adm
deleted file mode 100644
index 140eea9..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.05.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "id": 1, "x": "1", "y": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.adm
deleted file mode 100644
index 38e6954..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.06.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "id": 1, "x": 1, "y": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.adm
deleted file mode 100644
index a975f87..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.07.adm
+++ /dev/null
@@ -1,8 +0,0 @@
-{ "v4x": 1, "v2x": 1 }
-{ "v4x": 1, "v2x": 1 }
-{ "v4x": 1, "v2x": 1 }
-{ "v4x": 1, "v2x": 1 }
-{ "v4x": 2, "v2x": 2 }
-{ "v4x": 2, "v2x": 2 }
-{ "v4x": 2, "v2x": 2 }
-{ "v4x": 2, "v2x": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.adm
deleted file mode 100644
index e69de29..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.08.adm
+++ /dev/null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.adm
deleted file mode 100644
index e2015b1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.09.adm
+++ /dev/null
@@ -1,8 +0,0 @@
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.adm
deleted file mode 100644
index e2015b1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.10.adm
+++ /dev/null
@@ -1,8 +0,0 @@
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 1, "v1x": 1 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
-{ "v4x": 2, "v1x": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.adm
deleted file mode 100644
index 8d727bf..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.11.adm
+++ /dev/null
@@ -1,4 +0,0 @@
-{ "v4x": 1, "ds2x": 1 }
-{ "v4x": 1, "ds2x": 1 }
-{ "v4x": 2, "ds2x": 2 }
-{ "v4x": 2, "ds2x": 2 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.adm
deleted file mode 100644
index 107ba48..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.12.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_dt_fmt": datetime("2020-02-20T01:40:41.001") }
-{ "id": 4, "f_dt_fmt": datetime("2019-01-20T14:40:41.001") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.adm
deleted file mode 100644
index bac020d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.13.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_d_fmt": date("2020-02-20") }
-{ "id": 4, "f_d_fmt": date("2019-01-20") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.adm
deleted file mode 100644
index 66960b4..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.14.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_t_fmt": time("01:40:41.001") }
-{ "id": 4, "f_t_fmt": time("14:40:41.001") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.adm
deleted file mode 100644
index efc9e6a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.15.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_dt": datetime("2020-02-20T01:40:41.001") }
-{ "id": 4, "f_dt": datetime("2019-01-20T14:40:41.001") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.adm
deleted file mode 100644
index c0843a1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.16.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_d": date("2020-02-20") }
-{ "id": 4, "f_d": date("2019-01-20") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.adm
deleted file mode 100644
index bae3de6..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.17.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 1, "f_t": time("01:40:41.001") }
-{ "id": 4, "f_t": time("14:40:41.001") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.adm
deleted file mode 100644
index 448a834..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.18.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "v6f_dt": datetime("2019-01-20T14:40:41.001"), "v5f_dt_fmt": datetime("2019-01-20T14:40:41.001") }
-{ "v6f_dt": datetime("2020-02-20T01:40:41.001"), "v5f_dt_fmt": datetime("2020-02-20T01:40:41.001") }
-{ "v6f_dt": datetime("2021-11-25T22:12:51.999"), "v5f_dt_fmt": datetime("2021-11-25T22:12:51.999") }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.adm
deleted file mode 100644
index 49938d5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.19.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 2, "s_f2": "2" }
-{ "id": 3, "s_f2": "3.5" }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.adm
deleted file mode 100644
index e69de29..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.20.adm
+++ /dev/null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.adm
deleted file mode 100644
index e69de29..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.21.adm
+++ /dev/null
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.adm
deleted file mode 100644
index 78954d0..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.22.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 2, "s_f2": 2 }
-{ "id": 3, "s_f2": 3 }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.adm
deleted file mode 100644
index 49938d5..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/index-selection/cast-default-null-correlated/cast-default-null-correlated.23.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "id": 2, "s_f2": "2" }
-{ "id": 3, "s_f2": "3.5" }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index edd3418..fa7d501 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -4312,12 +4312,14 @@
</test-case>
<test-case FilePath="ddl">
<compilation-unit name="index-cast-null">
+ <placeholder name="with" value="" />
<output-dir compare="Text">index-cast-null</output-dir>
</compilation-unit>
</test-case>
<test-case FilePath="ddl">
- <compilation-unit name="index-cast-null-correlated">
- <output-dir compare="Text">index-cast-null-correlated</output-dir>
+ <compilation-unit name="index-cast-null">
+ <placeholder name="with" value="WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" />
+ <output-dir compare="Text">index-cast-null</output-dir>
</compilation-unit>
</test-case>
<test-case FilePath="ddl">
@@ -6537,12 +6539,14 @@
</test-case>
<test-case FilePath="index-selection">
<compilation-unit name="cast-default-null">
+ <placeholder name="with" value="" />
<output-dir compare="Text">cast-default-null</output-dir>
</compilation-unit>
</test-case>
<test-case FilePath="index-selection">
- <compilation-unit name="cast-default-null-correlated">
- <output-dir compare="Text">cast-default-null-correlated</output-dir>
+ <compilation-unit name="cast-default-null">
+ <placeholder name="with" value="WITH {'merge-policy': {'name': 'correlated-prefix','parameters': { 'max-mergable-component-size': 16384, 'max-tolerance-component-count': 3 }}}" />
+ <output-dir compare="Text">cast-default-null</output-dir>
</compilation-unit>
</test-case>
</test-group>