Skip to content
Permalink
Browse files
[ASTERIXDB-2785][AQL] Remove AQL Support
- user model changes: Yes, AQL is no longer supported.
- storage format changes: no
- interface changes: no

Details:

- Remove AQL Support.
- Remove AQL based AdmGenTests.
- Convert feed-stats API to SQL++.

Change-Id: Ia73de4b6552a7da10427506ac9605a000aab21d8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/8285
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
  • Loading branch information
mhubail committed Oct 8, 2020
1 parent ec22e7a commit ecfdcb8a0ff13ca7619983dbd3b2b47c254f4419
Show file tree
Hide file tree
Showing 55 changed files with 38 additions and 6,251 deletions.
@@ -29,7 +29,6 @@
public interface ILangExtension extends IExtension {

public enum Language {
AQL,
SQLPP
}

This file was deleted.

This file was deleted.

This file was deleted.

@@ -41,7 +41,6 @@
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.lang.aql.parser.TokenMgrError;
import org.apache.asterix.lang.common.base.IParser;
import org.apache.asterix.lang.common.base.IParserFactory;
import org.apache.asterix.lang.common.base.Statement;
@@ -73,17 +72,15 @@ public class ApiServlet extends AbstractServlet {
public static final String HTML_STATEMENT_SEPARATOR = "<!-- BEGIN -->";

private final ICcApplicationContext appCtx;
private final ILangCompilationProvider aqlCompilationProvider;
private final ILangCompilationProvider sqlppCompilationProvider;
private final IStatementExecutorFactory statementExectorFactory;
private final IStorageComponentProvider componentProvider;

public ApiServlet(ConcurrentMap<String, Object> ctx, String[] paths, ICcApplicationContext appCtx,
ILangCompilationProvider aqlCompilationProvider, ILangCompilationProvider sqlppCompilationProvider,
IStatementExecutorFactory statementExecutorFactory, IStorageComponentProvider componentProvider) {
ILangCompilationProvider sqlppCompilationProvider, IStatementExecutorFactory statementExecutorFactory,
IStorageComponentProvider componentProvider) {
super(ctx, paths);
this.appCtx = appCtx;
this.aqlCompilationProvider = aqlCompilationProvider;
this.sqlppCompilationProvider = sqlppCompilationProvider;
this.statementExectorFactory = statementExecutorFactory;
this.componentProvider = componentProvider;
@@ -93,8 +90,7 @@ public ApiServlet(ConcurrentMap<String, Object> ctx, String[] paths, ICcApplicat
protected void post(IServletRequest request, IServletResponse response) {
final IRequestReference requestReference = appCtx.getReceptionist().welcome(request);
// Query language
ILangCompilationProvider compilationProvider = "AQL".equals(request.getParameter("query-language"))
? aqlCompilationProvider : sqlppCompilationProvider;
ILangCompilationProvider compilationProvider = sqlppCompilationProvider;
IParserFactory parserFactory = compilationProvider.getParserFactory();

try {
@@ -161,7 +157,7 @@ protected void post(IServletRequest request, IServletResponse response) {
duration = (endTime - startTime) / 1000.00;
out.println(HTML_STATEMENT_SEPARATOR);
out.println("<PRE>Duration of all jobs: " + duration + " sec</PRE>");
} catch (AsterixException | TokenMgrError | org.apache.asterix.lang.sqlpp.parser.TokenMgrError pe) {
} catch (AsterixException | org.apache.asterix.lang.sqlpp.parser.TokenMgrError pe) {
GlobalConfig.ASTERIX_LOGGER.log(Level.INFO, pe.toString(), pe);
ResultUtil.webUIParseExceptionHandler(out, pe, query);
} catch (Exception e) {
@@ -69,7 +69,6 @@
import org.apache.asterix.common.exceptions.CompilationException;
import org.apache.asterix.common.exceptions.RuntimeDataException;
import org.apache.asterix.compiler.provider.ILangCompilationProvider;
import org.apache.asterix.lang.aql.parser.TokenMgrError;
import org.apache.asterix.lang.common.base.IParser;
import org.apache.asterix.lang.common.base.IParserFactory;
import org.apache.asterix.lang.common.base.Statement;
@@ -307,7 +306,7 @@ private void handleRequest(IServletRequest request, IServletResponse response, b
executionState.setStatus(ResultStatus.SUCCESS, HttpResponseStatus.OK);
}
errorCount = 0;
} catch (Exception | TokenMgrError | org.apache.asterix.lang.sqlpp.parser.TokenMgrError e) {
} catch (Exception | org.apache.asterix.lang.sqlpp.parser.TokenMgrError e) {
handleExecuteStatementException(e, executionState, param);
response.setStatus(executionState.getHttpStatus());
requestFailed(e, responsePrinter);
@@ -424,8 +423,7 @@ protected void executeStatement(IRequestReference requestReference, String state

protected void handleExecuteStatementException(Throwable t, RequestExecutionState executionState,
QueryServiceRequestParameters param) {
if (t instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrError || t instanceof TokenMgrError
|| t instanceof AlgebricksException) {
if (t instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrError || t instanceof AlgebricksException) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("handleException: {}: {}", t.getMessage(), LogRedactionUtil.statement(param.toString()),
t);

0 comments on commit ecfdcb8

Please sign in to comment.