Skip to content
Permalink
Browse files
[ASTERIXDB-2785][AQL] AQL Removal Cleanup
- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- Remove asterix-lang-aql module.
- Remove references to AQL.

Change-Id: I9fdc173aab0435e284c5364433c071d4cc1e19f0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/8323
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
  • Loading branch information
mhubail committed Oct 9, 2020
1 parent ecfdcb8 commit b777a52e3ea82024cafe5b66d2a46e49d65725b3
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 238 deletions.
@@ -115,11 +115,6 @@
<artifactId>asterix-lang-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-lang-aql</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-lang-sqlpp</artifactId>
@@ -579,11 +579,6 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-lang-aql</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hyracks</groupId>
<artifactId>hyracks-storage-am-lsm-btree</artifactId>
@@ -288,7 +288,6 @@
<label id="query-language" class="optlabel"> Query Language:<br/>
<select name="query-language" class="btn btn-width">
<option selected value="SQLPP">SQL++</option>
<option value="AQL">AQL</option>
</select>
</label>
<label id="output-format" class="optlabel"> Output Format:<br/>
@@ -144,7 +144,6 @@ public class TestExecutor {
.with(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY);
private static final ObjectReader RESULT_NODE_READER =
JSON_NODE_READER.with(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
private static final String AQL = "aql";
private static final String SQLPP = "sqlpp";
private static final String DEFAULT_PLAN_FORMAT = "string";
// see
@@ -1007,24 +1006,15 @@ public void executeTestFile(TestCaseContext testCaseCtx, TestFileContext ctx, Ma
switch (ctx.getType()) {
case "ddl":
ExtractedResult ddlExtractedResult;
if (ctx.getFile().getName().endsWith("aql")) {
ddlExtractedResult = executeAqlUpdateOrDdl(statement, OutputFormat.CLEAN_JSON);
} else {
ddlExtractedResult = executeSqlppUpdateOrDdl(statement, OutputFormat.CLEAN_JSON);
}

ddlExtractedResult = executeSqlppUpdateOrDdl(statement, OutputFormat.CLEAN_JSON);
validateWarning(ddlExtractedResult, testCaseCtx, cUnit, testFile, expectedWarnings);
break;
case "update":
// isDmlRecoveryTest: set IP address
if (isDmlRecoveryTest && statement.contains("nc1://")) {
statement = statement.replaceAll("nc1://", "127.0.0.1://../../../../../../asterix-app/");
}
if (ctx.getFile().getName().endsWith("aql")) {
executeAqlUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
} else {
executeSqlppUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
}
executeSqlppUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
break;
case "pollget":
case "pollquery":
@@ -1094,8 +1084,9 @@ public void executeTestFile(TestCaseContext testCaseCtx, TestFileContext ctx, Ma
runScriptAndCompareWithResult(testFile, qbcFile, qarFile, ComparisonEnum.TEXT, UTF_8, statement);
break;
case "txneu": // eu represents erroneous update
case "errddl":
try {
executeAqlUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
executeSqlppUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
} catch (Exception e) {
// An exception is expected.
failed = true;
@@ -1120,18 +1111,6 @@ public void executeTestFile(TestCaseContext testCaseCtx, TestFileContext ctx, Ma
String[] lines = stripLineComments(statement).trim().split("\n");
Thread.sleep(Long.parseLong(lines[lines.length - 1].trim()));
break;
case "errddl": // a ddlquery that expects error
try {
executeAqlUpdateOrDdl(statement, OutputFormat.forCompilationUnit(cUnit));
} catch (Exception e) {
// expected error happens
failed = true;
LOGGER.info("testFile {} raised an (expected) exception", testFile, e.toString());
}
if (!failed) {
throw new Exception("Test \"" + testFile + "\" FAILED; an exception was expected");
}
break;
case "get":
case "post":
case "put":
@@ -1608,10 +1587,6 @@ public ExtractedResult executeSqlppUpdateOrDdl(String statement, OutputFormat ou
return executeUpdateOrDdl(statement, outputFormat, getQueryServiceUri(SQLPP));
}

private ExtractedResult executeAqlUpdateOrDdl(String statement, OutputFormat outputFormat) throws Exception {
return executeUpdateOrDdl(statement, outputFormat, getQueryServiceUri(AQL));
}

private ExtractedResult executeUpdateOrDdl(String statement, OutputFormat outputFormat, URI serviceUri)
throws Exception {
try (InputStream resultStream = executeQueryService(statement, serviceUri, outputFormat, UTF_8)) {
@@ -77,7 +77,6 @@ public class JsonLogicalPlanTest {
}

protected static final String SEPARATOR = File.separator;
private static final String EXTENSION_AQL = "aql";
private static final String EXTENSION_SQLPP = "sqlpp";
private static final String EXTENSION_RESULT = "plan.json";
private static final String FILENAME_IGNORE = "ignore.txt";
@@ -133,7 +132,7 @@ private static void suiteBuildPerFile(File file, Collection<Object[]> testArgs,
suiteBuildPerFile(innerfile, testArgs, subdir);
}
}
if (file.isFile() && (file.getName().endsWith(EXTENSION_AQL) || file.getName().endsWith(EXTENSION_SQLPP))) {
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 });
@@ -72,7 +72,6 @@ public class OptimizerTest {
private static final Logger LOGGER = LogManager.getLogger();

private static final String SEPARATOR = File.separator;
private static final String EXTENSION_AQL = "aql";
private static final String EXTENSION_SQLPP = "sqlpp";
private static final String EXTENSION_RESULT = "plan";
private static final String FILENAME_IGNORE = "ignore.txt";
@@ -132,7 +131,7 @@ private static void suiteBuildPerFile(File file, Collection<Object[]> testArgs,
suiteBuildPerFile(innerfile, testArgs, subdir);
}
}
if (file.isFile() && (file.getName().endsWith(EXTENSION_AQL) || file.getName().endsWith(EXTENSION_SQLPP))) {
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);
@@ -39,7 +39,6 @@ public static final class MessageConstants {
public static final String DATAVERSE = "dataverse";
public static final String FEED = "feed";
public static final String DATASET = "dataset";
public static final String AQL = "aql";
public static final String RUNTIME_TYPE = "runtime-type";
public static final String PARTITION = "partition";
public static final String INTAKE_PARTITION = "intake-partition";
@@ -47,7 +47,6 @@ public static enum Relation {
public static final String FILE_PART = "part-";
public static final String FILE_PART0 = FILE_PART + "00000";
public static final String FILE_EXPECTED = "expected.txt";
public static final String AQL = "aql";

public static final String PATH_RAW = "raw";
public static final String PATH_RECORDPAIRS = "recordpairs";
@@ -72,7 +71,6 @@ public void createDirecotries(String[] paths, int crtCopy) {
(new File(paths[0] + getPathDirecotry(Directory.RECORDS_S, crtCopy))).mkdir();
(new File(paths[0] + getPathDirecotry(Directory.TOKENS, crtCopy))).mkdir();
(new File(paths[0] + getPathDirecotry(Directory.TOKENS_R, crtCopy))).mkdir();
(new File(paths[0] + getPathDirecotry(Directory.TOKENS_R_AQL, crtCopy))).mkdir();
}

public abstract String getName();
@@ -122,9 +120,6 @@ public String getPathDirectory(String path, Directory directory, int crtCopy) {
case TOKENS_R:
path += AbstractDataset.PATH_TOKENS + "." + getSuffix(Relation.R);
break;
case TOKENS_R_AQL:
path += AbstractDataset.PATH_TOKENS + "." + getSuffix(Relation.R) + "." + AQL;
break;
case RIDPAIRS:
path += AbstractDataset.PATH_RIDPAIRS;
break;

This file was deleted.

@@ -84,12 +84,6 @@
</build>

<dependencies>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-lang-aql</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-algebra</artifactId>
@@ -883,7 +883,6 @@
<modules>
<module>asterix-common</module>
<module>asterix-lang-common</module>
<module>asterix-lang-aql</module>
<module>asterix-lang-sqlpp</module>
<module>asterix-algebra</module>
<module>asterix-app</module>

0 comments on commit b777a52

Please sign in to comment.