[ASTERIXDB-2631][COMP][RT] Report count of all warnings
- user model changes: no
- storage format changes: no
- interface changes: yes
Details:
Currently, only runtime warnings are counted. Include
parser & compile-time warnings, as well.
- removed the warn limit as a compiler option and made it
a request parameter.
- the warning collector of the parser collects all warnings
but allow pulling warnings up to a maximum desired.
- the warning collector of the compiler/executor collects up
to the request max-warnings and allow pulling up to a max desired.
- servlets collect from the parser and query compiler &
executor up to the request max-warnings.
Change-Id: Ia7e559313d32a8ba6f450f254a3a7b4b1e662a50
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3564
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
index a9680cb..d8fa3d6 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/ConstantFoldingRule.java
@@ -143,8 +143,7 @@
BinaryComparatorFactoryProvider.INSTANCE, TypeTraitProvider.INSTANCE, BinaryBooleanInspector.FACTORY,
BinaryIntegerInspector.FACTORY, ADMPrinterFactoryProvider.INSTANCE, MissingWriterFactory.INSTANCE, null,
new ExpressionRuntimeProvider(new QueryLogicalExpressionJobGen(metadataProvider.getFunctionManager())),
- ExpressionTypeComputer.INSTANCE, null, null, null, null, GlobalConfig.DEFAULT_FRAME_SIZE, null,
- appCtx.getCompilerProperties().getNumRuntimeWarnings());
+ ExpressionTypeComputer.INSTANCE, null, null, null, null, GlobalConfig.DEFAULT_FRAME_SIZE, null, 0);
}
@Override
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IRequestParameters.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IRequestParameters.java
index e242258..0cec738 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IRequestParameters.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IRequestParameters.java
@@ -60,4 +60,9 @@
* {@code 0} if all categories are allowed
*/
int getStatementCategoryRestrictionMask();
+
+ /**
+ * @return the maximum number of warnings to be reported.
+ */
+ long getMaxWarnings();
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IStatementExecutor.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IStatementExecutor.java
index 606abd2..a515def 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IStatementExecutor.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/IStatementExecutor.java
@@ -136,8 +136,10 @@
return totalWarningsCount;
}
- public void setTotalWarningsCount(long totalWarningsCount) {
- this.totalWarningsCount = totalWarningsCount;
+ public void updateTotalWarningsCount(long delta) {
+ if (delta <= Long.MAX_VALUE - totalWarningsCount) {
+ totalWarningsCount += delta;
+ }
}
public void setJobProfile(ObjectNode profile) {
@@ -241,7 +243,7 @@
IResponsePrinter getResponsePrinter();
/**
- * Gets the warnings generated during compiling and executing a request
+ * Gets the warnings generated during compiling and executing a request up to the max number argument.
*/
- void getWarnings(Collection<? super Warning> outWarnings);
+ void getWarnings(Collection<? super Warning> outWarnings, long maxWarnings);
}
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index 9e1dcdf..a31c1b2 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@ -33,6 +33,7 @@
import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
+import org.apache.asterix.api.http.server.QueryServiceRequestParameters;
import org.apache.asterix.app.result.fields.ExplainOnlyResultsPrinter;
import org.apache.asterix.common.api.INodeJobTracker;
import org.apache.asterix.common.api.IResponsePrinter;
@@ -128,19 +129,21 @@
private static final ObjectWriter OBJECT_WRITER = new ObjectMapper().writerWithDefaultPrettyPrinter();
- // A white list of supported configurable parameters.
public static final String PREFIX_INTERNAL_PARAMETERS = "_internal";
- private static final Set<String> CONFIGURABLE_PARAMETER_NAMES = ImmutableSet.of(
- CompilerProperties.COMPILER_JOINMEMORY_KEY, CompilerProperties.COMPILER_GROUPMEMORY_KEY,
- CompilerProperties.COMPILER_SORTMEMORY_KEY, CompilerProperties.COMPILER_WINDOWMEMORY_KEY,
- CompilerProperties.COMPILER_TEXTSEARCHMEMORY_KEY, CompilerProperties.COMPILER_PARALLELISM_KEY,
- CompilerProperties.COMPILER_SORT_PARALLEL_KEY, CompilerProperties.COMPILER_SORT_SAMPLES_KEY,
- FunctionUtil.IMPORT_PRIVATE_FUNCTIONS, FuzzyUtils.SIM_FUNCTION_PROP_NAME,
- FuzzyUtils.SIM_THRESHOLD_PROP_NAME, StartFeedStatement.WAIT_FOR_COMPLETION,
- FeedActivityDetails.FEED_POLICY_NAME, FeedActivityDetails.COLLECT_LOCATIONS,
- SqlppQueryRewriter.INLINE_WITH_OPTION, SqlppExpressionToPlanTranslator.REWRITE_IN_AS_OR_OPTION,
- "hash_merge", "output-record-type", AbstractIntroduceAccessMethodRule.NO_INDEX_ONLY_PLAN_OPTION,
- DisjunctivePredicateToJoinRule.REWRITE_OR_AS_JOIN_OPTION, CompilerProperties.COMPILER_RUNTIME_WARNINGS_KEY);
+ public static final String REQUEST_MAX_WARNINGS = PREFIX_INTERNAL_PARAMETERS + "_max_warn";
+
+ // A white list of supported configurable parameters.
+ private static final Set<String> CONFIGURABLE_PARAMETER_NAMES =
+ ImmutableSet.of(CompilerProperties.COMPILER_JOINMEMORY_KEY, CompilerProperties.COMPILER_GROUPMEMORY_KEY,
+ CompilerProperties.COMPILER_SORTMEMORY_KEY, CompilerProperties.COMPILER_WINDOWMEMORY_KEY,
+ CompilerProperties.COMPILER_TEXTSEARCHMEMORY_KEY, CompilerProperties.COMPILER_PARALLELISM_KEY,
+ CompilerProperties.COMPILER_SORT_PARALLEL_KEY, CompilerProperties.COMPILER_SORT_SAMPLES_KEY,
+ FunctionUtil.IMPORT_PRIVATE_FUNCTIONS, FuzzyUtils.SIM_FUNCTION_PROP_NAME,
+ FuzzyUtils.SIM_THRESHOLD_PROP_NAME, StartFeedStatement.WAIT_FOR_COMPLETION,
+ FeedActivityDetails.FEED_POLICY_NAME, FeedActivityDetails.COLLECT_LOCATIONS,
+ SqlppQueryRewriter.INLINE_WITH_OPTION, SqlppExpressionToPlanTranslator.REWRITE_IN_AS_OR_OPTION,
+ "hash_merge", "output-record-type", AbstractIntroduceAccessMethodRule.NO_INDEX_ONLY_PLAN_OPTION,
+ DisjunctivePredicateToJoinRule.REWRITE_OR_AS_JOIN_OPTION);
private final IRewriterFactory rewriterFactory;
private final IAstPrintVisitorFactory astPrintVisitorFactory;
@@ -243,6 +246,9 @@
builder.setMissableTypeComputer(MissableTypeComputer.INSTANCE);
builder.setConflictingTypeResolver(ConflictingTypeResolver.INSTANCE);
builder.setWarningCollector(warningCollector);
+ String maxWarnings = metadataProvider.getProperty(APIFramework.REQUEST_MAX_WARNINGS);
+ builder.setMaxWarnings(
+ maxWarnings != null ? Long.parseLong(maxWarnings) : QueryServiceRequestParameters.DEFAULT_MAX_WARNINGS);
int parallelism = getParallelism((String) querySpecificConfig.get(CompilerProperties.COMPILER_PARALLELISM_KEY),
compilerProperties.getParallelism());
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
index 2c499c7..033bb16 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/NCQueryServiceServlet.java
@@ -88,11 +88,11 @@
}
int stmtCategoryRestrictionMask = org.apache.asterix.app.translator.RequestParameters
.getStatementCategoryRestrictionMask(param.isReadOnly());
- ExecuteStatementRequestMessage requestMsg =
- new ExecuteStatementRequestMessage(ncCtx.getNodeId(), responseFuture.getFutureId(), queryLanguage,
- statementsText, sessionOutput.config(), resultProperties.getNcToCcResultProperties(),
- param.getClientContextID(), handleUrl, optionalParameters, statementParameters,
- param.isMultiStatement(), param.isProfile(), stmtCategoryRestrictionMask, requestReference);
+ ExecuteStatementRequestMessage requestMsg = new ExecuteStatementRequestMessage(ncCtx.getNodeId(),
+ responseFuture.getFutureId(), queryLanguage, statementsText, sessionOutput.config(),
+ resultProperties.getNcToCcResultProperties(), param.getClientContextID(), handleUrl,
+ optionalParameters, statementParameters, param.isMultiStatement(), param.isProfile(),
+ stmtCategoryRestrictionMask, requestReference, param.getMaxWarnings());
execution.start();
ncMb.sendMessageToPrimaryCC(requestMsg);
try {
@@ -122,6 +122,7 @@
throw new Exception(err.toString(), err);
}
}
+ updateStatsFromCC(stats, responseMsg);
if (hasResult(responseMsg)) {
responsePrinter.addResultPrinter(
new NcResultPrinter(appCtx, responseMsg, getResultSet(), delivery, sessionOutput, stats));
@@ -173,4 +174,12 @@
private static boolean hasResult(ExecuteStatementResponseMessage responseMsg) {
return !responseMsg.getMetadata().getResultSets().isEmpty() || !responseMsg.getResult().isEmpty();
}
+
+ private static void updateStatsFromCC(IStatementExecutor.Stats stats, ExecuteStatementResponseMessage responseMsg) {
+ IStatementExecutor.Stats responseStats = responseMsg.getStats();
+ stats.setJobProfile(responseStats.getJobProfile());
+ stats.setProcessedObjects(responseStats.getProcessedObjects());
+ stats.setDiskIoCount(responseStats.getDiskIoCount());
+ stats.updateTotalWarningsCount(responseStats.getTotalWarningsCount());
+ }
}
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceRequestParameters.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceRequestParameters.java
index ff6dcbd..9664e80 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceRequestParameters.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceRequestParameters.java
@@ -30,6 +30,7 @@
public class QueryServiceRequestParameters {
+ public static final long DEFAULT_MAX_WARNINGS = 0L;
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private String host;
@@ -53,6 +54,7 @@
private boolean profile;
private boolean signature;
private boolean multiStatement;
+ private long maxWarnings = DEFAULT_MAX_WARNINGS;
public String getHost() {
return host;
@@ -222,6 +224,14 @@
this.multiStatement = multiStatement;
}
+ public void setMaxWarnings(long maxWarnings) {
+ this.maxWarnings = maxWarnings;
+ }
+
+ public long getMaxWarnings() {
+ return maxWarnings;
+ }
+
public ObjectNode asJson() {
ObjectNode object = OBJECT_MAPPER.createObjectNode();
object.put("host", host);
@@ -244,6 +254,7 @@
object.put("multiStatement", multiStatement);
object.put("parseOnly", parseOnly);
object.put("readOnly", readOnly);
+ object.put("maxWarnings", maxWarnings);
if (statementParams != null) {
for (Map.Entry<String, JsonNode> statementParam : statementParams.entrySet()) {
object.set('$' + statementParam.getKey(), statementParam.getValue());
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
index d193b13..8dc788c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
@@ -173,7 +173,8 @@
JOB("job"),
PROFILE("profile"),
SIGNATURE("signature"),
- MULTI_STATEMENT("multi-statement");
+ MULTI_STATEMENT("multi-statement"),
+ MAX_WARNINGS("max-warnings");
private final String str;
@@ -305,15 +306,25 @@
return value != null ? value.asBoolean() : defaultValue;
}
- protected String getParameter(IServletRequest request, Parameter parameter) {
- return request.getParameter(parameter.str());
+ protected long getOptLong(JsonNode node, Parameter parameter, long defaultValue) {
+ final JsonNode value = node.get(parameter.str);
+ return value != null ? Integer.parseInt(value.asText()) : defaultValue;
+ }
+
+ protected long getOptLong(IServletRequest request, Parameter parameter, long defaultValue) {
+ String value = getParameter(request, parameter);
+ return value == null ? defaultValue : Integer.parseInt(value);
}
protected boolean getOptBoolean(IServletRequest request, Parameter parameter, boolean defaultValue) {
- String value = request.getParameter(parameter.str());
+ String value = getParameter(request, parameter);
return value == null ? defaultValue : Boolean.parseBoolean(value);
}
+ protected String getParameter(IServletRequest request, Parameter parameter) {
+ return request.getParameter(parameter.str());
+ }
+
@FunctionalInterface
interface CheckedFunction<I, O> {
O apply(I requestParamValue) throws IOException;
@@ -389,6 +400,8 @@
param.setStatementParams(
getOptStatementParameters(jsonRequest, jsonRequest.fieldNames(), JsonNode::get, v -> v));
param.setMultiStatement(getOptBoolean(jsonRequest, Parameter.MULTI_STATEMENT, true));
+ param.setMaxWarnings(
+ getOptLong(jsonRequest, Parameter.MAX_WARNINGS, QueryServiceRequestParameters.DEFAULT_MAX_WARNINGS));
setJsonOptionalParameters(jsonRequest, param, optionalParameters);
}
@@ -417,6 +430,8 @@
param.setProfile(getOptBoolean(request, Parameter.PROFILE, false));
param.setSignature(getOptBoolean(request, Parameter.SIGNATURE, true));
param.setMultiStatement(getOptBoolean(request, Parameter.MULTI_STATEMENT, true));
+ param.setMaxWarnings(
+ getOptLong(request, Parameter.MAX_WARNINGS, QueryServiceRequestParameters.DEFAULT_MAX_WARNINGS));
try {
param.setStatementParams(getOptStatementParameters(request, request.getParameterNames().iterator(),
IServletRequest::getParameter, OBJECT_MAPPER::readTree));
@@ -575,7 +590,7 @@
stats.getCount(), stats.getSize(), stats.getProcessedObjects(), errorCount,
stats.getTotalWarningsCount(), stats.getDiskIoCount());
responsePrinter.addFooterPrinter(new MetricsPrinter(metrics, resultCharset));
- if (stats.getType() == Stats.ProfileType.FULL) {
+ if (isPrintingProfile(stats)) {
responsePrinter.addFooterPrinter(new ProfilePrinter(stats.getJobProfile()));
}
}
@@ -610,7 +625,9 @@
}
IParser parser = compilationProvider.getParserFactory().createParser(statementsText);
List<Statement> statements = parser.parse();
- parser.getWarnings(warnings);
+ long maxWarnings = param.getMaxWarnings();
+ parser.getWarnings(warnings, maxWarnings);
+ long parserTotalWarningsCount = parser.getTotalWarningsCount();
MetadataManager.INSTANCE.init();
IStatementExecutor translator = statementExecutorFactory.create((ICcApplicationContext) appCtx, statements,
sessionOutput, compilationProvider, componentProvider, responsePrinter);
@@ -621,10 +638,11 @@
.getStatementCategoryRestrictionMask(param.isReadOnly());
IRequestParameters requestParameters = new org.apache.asterix.app.translator.RequestParameters(requestReference,
statementsText, getResultSet(), resultProperties, stats, null, param.getClientContextID(),
- optionalParameters, stmtParams, param.isMultiStatement(), stmtCategoryRestriction);
+ optionalParameters, stmtParams, param.isMultiStatement(), stmtCategoryRestriction, maxWarnings);
translator.compileAndExecute(getHyracksClientConnection(), requestParameters);
execution.end();
- translator.getWarnings(warnings);
+ translator.getWarnings(warnings, maxWarnings - warnings.size());
+ stats.updateTotalWarningsCount(parserTotalWarningsCount);
buildResponseResults(responsePrinter, sessionOutput, translator.getExecutionPlans(), warnings);
}
@@ -727,4 +745,8 @@
}
return i > startIndex;
}
+
+ private static boolean isPrintingProfile(IStatementExecutor.Stats stats) {
+ return stats.getType() == Stats.ProfileType.FULL && stats.getJobProfile() != null;
+ }
}
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
index 4e2fea0..7396035 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
@@ -24,10 +24,9 @@
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.HashSet;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.apache.asterix.algebra.base.ILangExtension;
@@ -90,12 +89,13 @@
private final int statementCategoryRestrictionMask;
private final boolean profile;
private final IRequestReference requestReference;
+ private final long maxWarnings;
public ExecuteStatementRequestMessage(String requestNodeId, long requestMessageId, ILangExtension.Language lang,
String statementsText, SessionConfig sessionConfig, ResultProperties resultProperties,
String clientContextID, String handleUrl, Map<String, String> optionalParameters,
Map<String, byte[]> statementParameters, boolean multiStatement, boolean profile,
- int statementCategoryRestrictionMask, IRequestReference requestReference) {
+ int statementCategoryRestrictionMask, IRequestReference requestReference, long maxWarnings) {
this.requestNodeId = requestNodeId;
this.requestMessageId = requestMessageId;
this.lang = lang;
@@ -110,6 +110,7 @@
this.statementCategoryRestrictionMask = statementCategoryRestrictionMask;
this.profile = profile;
this.requestReference = requestReference;
+ this.maxWarnings = maxWarnings;
}
@Override
@@ -129,10 +130,11 @@
IStatementExecutorFactory statementExecutorFactory = ccApp.getStatementExecutorFactory();
ExecuteStatementResponseMessage responseMsg = new ExecuteStatementResponseMessage(requestMessageId);
try {
- Set<Warning> warnings = new HashSet<>();
+ List<Warning> warnings = new ArrayList<>();
IParser parser = compilationProvider.getParserFactory().createParser(statementsText);
List<Statement> statements = parser.parse();
- parser.getWarnings(warnings);
+ parser.getWarnings(warnings, maxWarnings);
+ long parserTotalWarningsCount = parser.getTotalWarningsCount();
StringWriter outWriter = new StringWriter(256);
PrintWriter outPrinter = new PrintWriter(outWriter);
SessionOutput.ResultDecorator resultPrefix = ResultUtil.createPreResultDecorator();
@@ -150,9 +152,10 @@
Map<String, IAObject> stmtParams = RequestParameters.deserializeParameterValues(statementParameters);
final IRequestParameters requestParameters = new RequestParameters(requestReference, statementsText, null,
resultProperties, stats, outMetadata, clientContextID, optionalParameters, stmtParams,
- multiStatement, statementCategoryRestrictionMask);
+ multiStatement, statementCategoryRestrictionMask, maxWarnings);
translator.compileAndExecute(ccApp.getHcc(), requestParameters);
- translator.getWarnings(warnings);
+ translator.getWarnings(warnings, maxWarnings - warnings.size());
+ stats.updateTotalWarningsCount(parserTotalWarningsCount);
outPrinter.close();
responseMsg.setResult(outWriter.toString());
responseMsg.setMetadata(outMetadata);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/JobResultCallback.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/JobResultCallback.java
index 43d7cd9..f34ee37 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/JobResultCallback.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/JobResultCallback.java
@@ -40,8 +40,6 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
public class JobResultCallback implements IJobResultCallback {
private static final Logger LOGGER = LogManager.getLogger();
@@ -70,16 +68,6 @@
aggregateJobStats(jobId, metadata);
}
- ObjectNode getProfile(JobId jobId) {
- IJobManager jobManager =
- ((ClusterControllerService) appCtx.getServiceContext().getControllerService()).getJobManager();
- final JobRun run = jobManager.get(jobId);
- if (run != null) {
- return run.getJobProfile().toJSON();
- }
- return null;
- }
-
private void aggregateJobStats(JobId jobId, ResultMetadata metadata) {
long processedObjects = 0;
long diskIoCount = 0;
@@ -91,7 +79,7 @@
if (run != null) {
final JobProfile jobProfile = run.getJobProfile();
final Collection<JobletProfile> jobletProfiles = jobProfile.getJobletProfiles().values();
- final long runtimeWarningsLimit = run.getJobSpecification().getRuntimeWarningsLimit();
+ final long maxWarnings = run.getJobSpecification().getMaxWarnings();
for (JobletProfile jp : jobletProfiles) {
final Collection<TaskProfile> jobletTasksProfile = jp.getTaskProfiles().values();
for (TaskProfile tp : jobletTasksProfile) {
@@ -99,9 +87,9 @@
diskIoCount += tp.getStatsCollector().getAggregatedStats().getDiskIoCounter().get();
aggregateTotalWarningsCount += tp.getTotalWarningsCount();
Set<Warning> taskWarnings = tp.getWarnings();
- if (AggregateWarnings.size() < runtimeWarningsLimit && !taskWarnings.isEmpty()) {
+ if (AggregateWarnings.size() < maxWarnings && !taskWarnings.isEmpty()) {
Iterator<Warning> taskWarningsIt = taskWarnings.iterator();
- while (AggregateWarnings.size() < runtimeWarningsLimit && taskWarningsIt.hasNext()) {
+ while (AggregateWarnings.size() < maxWarnings && taskWarningsIt.hasNext()) {
AggregateWarnings.add(taskWarningsIt.next());
}
}
@@ -112,9 +100,10 @@
metadata.setWarnings(AggregateWarnings);
metadata.setDiskIoCount(diskIoCount);
metadata.setTotalWarningsCount(aggregateTotalWarningsCount);
- if (run.getFlags() != null && run.getFlags().contains(JobFlag.PROFILE_RUNTIME)) {
- metadata.setJobProfile(getProfile(jobId));
+ if (run != null && run.getFlags() != null && run.getFlags().contains(JobFlag.PROFILE_RUNTIME)) {
+ metadata.setJobProfile(run.getJobProfile().toJSON());
+ } else {
+ metadata.setJobProfile(null);
}
}
-
}
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcResultPrinter.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcResultPrinter.java
index c37db07..ccf970c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcResultPrinter.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/fields/NcResultPrinter.java
@@ -61,11 +61,6 @@
IStatementExecutor.ResultMetadata resultMetadata = responseMsg.getMetadata();
List<Triple<JobId, ResultSetId, ARecordType>> resultSets = resultMetadata.getResultSets();
if (delivery == IStatementExecutor.ResultDelivery.IMMEDIATE && !resultSets.isEmpty()) {
- IStatementExecutor.Stats responseStats = responseMsg.getStats();
- stats.setJobProfile(responseStats.getJobProfile());
- stats.setProcessedObjects(responseStats.getProcessedObjects());
- stats.setDiskIoCount(responseStats.getDiskIoCount());
- stats.setTotalWarningsCount(responseStats.getTotalWarningsCount());
for (int i = 0; i < resultSets.size(); i++) {
Triple<JobId, ResultSetId, ARecordType> rsmd = resultSets.get(i);
ResultReader resultReader = new ResultReader(resultSet, rsmd.getLeft(), rsmd.getMiddle());
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index a53ca88..72bc2e7 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -75,6 +75,7 @@
import org.apache.asterix.common.exceptions.MetadataException;
import org.apache.asterix.common.exceptions.RuntimeDataException;
import org.apache.asterix.common.exceptions.WarningCollector;
+import org.apache.asterix.common.exceptions.WarningUtil;
import org.apache.asterix.common.functions.FunctionSignature;
import org.apache.asterix.common.utils.JobUtils;
import org.apache.asterix.common.utils.JobUtils.ProgressState;
@@ -289,6 +290,9 @@
final Stats stats = requestParameters.getStats();
final ResultMetadata outMetadata = requestParameters.getOutMetadata();
final Map<String, IAObject> stmtParams = requestParameters.getStatementParameters();
+ final long requestMaxWarnings = requestParameters.getMaxWarnings();
+ config.put(APIFramework.REQUEST_MAX_WARNINGS, String.valueOf(requestMaxWarnings));
+ warningCollector.setMaxWarnings(requestMaxWarnings);
try {
for (Statement stmt : statements) {
if (sessionConfig.is(SessionConfig.FORMAT_HTML)) {
@@ -2487,6 +2491,8 @@
try {
final JobSpecification jobSpec =
rewriteCompileQuery(hcc, metadataProvider, query, null, stmtParams, stmtRewriter);
+ // update stats with count of compile-time warnings. needs to be adapted for multi-statement.
+ stats.updateTotalWarningsCount(warningCollector.getTotalWarningsCount());
afterCompile();
MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
bActiveTxn = false;
@@ -2556,8 +2562,8 @@
stats.setJobProfile(resultMetadata.getJobProfile());
}
stats.setDiskIoCount(resultMetadata.getDiskIoCount());
- stats.setTotalWarningsCount(resultMetadata.getTotalWarningsCount());
- warningCollector.warn(resultMetadata.getWarnings());
+ stats.updateTotalWarningsCount(resultMetadata.getTotalWarningsCount());
+ WarningUtil.mergeWarnings(resultMetadata.getWarnings(), warningCollector);
}
private void asyncCreateAndRunJob(IHyracksClientConnection hcc, IStatementCompiler compiler, IMetadataLocker locker,
@@ -2932,8 +2938,8 @@
}
@Override
- public void getWarnings(Collection<? super Warning> outWarnings) {
- warningCollector.getWarnings(outWarnings);
+ public void getWarnings(Collection<? super Warning> outWarnings, long maxWarnings) {
+ warningCollector.getWarnings(outWarnings, maxWarnings);
}
/**
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/RequestParameters.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/RequestParameters.java
index 90602e7..3b15e1c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/RequestParameters.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/RequestParameters.java
@@ -23,6 +23,7 @@
import java.util.HashMap;
import java.util.Map;
+import org.apache.asterix.api.http.server.QueryServiceRequestParameters;
import org.apache.asterix.common.api.IRequestReference;
import org.apache.asterix.external.parser.JSONDataParser;
import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
@@ -56,19 +57,21 @@
private final boolean multiStatement;
private final int statementCategoryRestrictionMask;
private final String statement;
+ private final long maxWarnings;
public RequestParameters(IRequestReference requestReference, String statement, IResultSet resultSet,
ResultProperties resultProperties, Stats stats, IStatementExecutor.ResultMetadata outMetadata,
String clientContextId, Map<String, String> optionalParameters, Map<String, IAObject> statementParameters,
boolean multiStatement) {
this(requestReference, statement, resultSet, resultProperties, stats, outMetadata, clientContextId,
- optionalParameters, statementParameters, multiStatement, NO_CATEGORY_RESTRICTION_MASK);
+ optionalParameters, statementParameters, multiStatement, NO_CATEGORY_RESTRICTION_MASK,
+ QueryServiceRequestParameters.DEFAULT_MAX_WARNINGS);
}
public RequestParameters(IRequestReference requestReference, String statement, IResultSet resultSet,
ResultProperties resultProperties, Stats stats, IStatementExecutor.ResultMetadata outMetadata,
String clientContextId, Map<String, String> optionalParameters, Map<String, IAObject> statementParameters,
- boolean multiStatement, int statementCategoryRestrictionMask) {
+ boolean multiStatement, int statementCategoryRestrictionMask, long maxWarnings) {
this.requestReference = requestReference;
this.statement = statement;
this.resultSet = resultSet;
@@ -80,6 +83,7 @@
this.statementParameters = statementParameters;
this.multiStatement = multiStatement;
this.statementCategoryRestrictionMask = statementCategoryRestrictionMask;
+ this.maxWarnings = maxWarnings;
}
@Override
@@ -123,6 +127,11 @@
}
@Override
+ public long getMaxWarnings() {
+ return maxWarnings;
+ }
+
+ @Override
public Map<String, IAObject> getStatementParameters() {
return statementParameters;
}
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.2.query.sqlpp
index 572acff..9ad4329 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.2.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.2.query.sqlpp
@@ -20,6 +20,8 @@
/*
* Description : Warn and ignore duplicates if there's a duplicate field name in the closed-object-constructor() function
*/
+// requesttype=application/json
+// param max-warnings:json=10
set `import-private-functions` `true`;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.3.query.sqlpp
index 23f718f..b69d2c3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/flwor/query-ASTERIXDB-2446/query-ASTERIXDB-2446.3.query.sqlpp
@@ -20,6 +20,8 @@
/*
* Description : Warn and ignore duplicates if there's a duplicate field name in the open-object-constructor() function
*/
+// requesttype=application/json
+// param max-warnings:json=10
set `import-private-functions` `true`;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.03.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.03.query.sqlpp
index 2528045..6dec119 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.03.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.03.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from closedDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.04.query.sqlpp
index 882f465..bbfb127 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.04.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.04.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from openDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.05.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.05.query.sqlpp
index 145b429..66fa93c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.05.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.05.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from openDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.06.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.06.query.sqlpp
index 1c5d037..a3cc0c2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.06.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.06.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from closedDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.07.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.07.query.sqlpp
index 09a952d..8228ba3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.07.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.07.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from openDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.08.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.08.query.sqlpp
index 138bce5..f1f433d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.08.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_01/fun_return_null_01.08.query.sqlpp
@@ -20,11 +20,12 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
use test;
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
from openDS as ds
select
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_02/fun_return_null_02.01.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_02/fun_return_null_02.01.query.sqlpp
index c504df6..d4c99e3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_02/fun_return_null_02.01.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/fun_return_null/fun_return_null_02/fun_return_null_02.01.query.sqlpp
@@ -20,9 +20,10 @@
/*
* Description: tests reporting type mismatch for string functions
*/
+// requesttype=application/json
+// param max-warnings:json=1000
set `import-private-functions` "true";
-set `compiler.runtime.warnings` "10000";
FROM[
`LIKE`("aa", int8("8")),
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
index 3f8860f..87bd204 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
@@ -105,8 +105,8 @@
<test-case FilePath="objects" check-warnings="true">
<compilation-unit name="no_fieldname_constr">
<output-dir compare="Text">no_fieldname_constr</output-dir>
- <expected-warn>Encountered a cross product join (in line 25, at column 22)</expected-warn>
- <expected-warn>Duplicate field name "a" (in line 29, at column 24)</expected-warn>
+ <expected-warn>Encountered a cross product join (in line 27, at column 22)</expected-warn>
+ <expected-warn>Duplicate field name "a" (in line 31, at column 24)</expected-warn>
</compilation-unit>
</test-case>
<test-case FilePath="objects">
@@ -189,7 +189,7 @@
<test-case FilePath="objects" check-warnings="true">
<compilation-unit name="closed-closed-fieldname-conflict_issue173">
<output-dir compare="Text">closed-closed-fieldname-conflict_issue173</output-dir>
- <expected-warn>Duplicate field name "name" (in line 28, at column 16)</expected-warn>
+ <expected-warn>Duplicate field name "name" (in line 30, at column 16)</expected-warn>
</compilation-unit>
</test-case>
<test-case FilePath="objects" check-warnings="true">
@@ -217,15 +217,15 @@
<test-case FilePath="objects" check-warnings="true">
<compilation-unit name="object_duplicate_fields">
<output-dir compare="Text">object_duplicate_fields</output-dir>
- <expected-warn>Duplicate field name "name" (in line 25, at column 1)</expected-warn>
- <expected-warn>Duplicate field name "Name" (in line 27, at column 1)</expected-warn>
- <expected-warn>Duplicate field name "name" (in line 29, at column 1)</expected-warn>
- <expected-warn>Duplicate field name "name" (in line 20, at column 30)</expected-warn>
- <expected-warn>Duplicate field name "id" (in line 20, at column 56)</expected-warn>
- <expected-warn>Duplicate field name "f1" (in line 20, at column 70)</expected-warn>
- <expected-warn>Duplicate field name "id" (in line 20, at column 36)</expected-warn>
- <expected-warn>Duplicate field name "f1" (in line 20, at column 83)</expected-warn>
- <expected-warn>Duplicate field name "fname1" (in line 23, at column 45)</expected-warn>
+ <expected-warn>Duplicate field name "name" (in line 27, at column 1)</expected-warn>
+ <expected-warn>Duplicate field name "Name" (in line 29, at column 1)</expected-warn>
+ <expected-warn>Duplicate field name "name" (in line 31, at column 1)</expected-warn>
+ <expected-warn>Duplicate field name "name" (in line 22, at column 30)</expected-warn>
+ <expected-warn>Duplicate field name "id" (in line 22, at column 56)</expected-warn>
+ <expected-warn>Duplicate field name "f1" (in line 22, at column 70)</expected-warn>
+ <expected-warn>Duplicate field name "id" (in line 22, at column 36)</expected-warn>
+ <expected-warn>Duplicate field name "f1" (in line 22, at column 83)</expected-warn>
+ <expected-warn>Duplicate field name "fname1" (in line 25, at column 45)</expected-warn>
</compilation-unit>
</test-case>
</test-group>
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/closed-closed-fieldname-conflict_issue173/closed-closed-fieldname-conflict_issue173.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/closed-closed-fieldname-conflict_issue173/closed-closed-fieldname-conflict_issue173.3.query.sqlpp
index efc6d34..8e53df5 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/closed-closed-fieldname-conflict_issue173/closed-closed-fieldname-conflict_issue173.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/closed-closed-fieldname-conflict_issue173/closed-closed-fieldname-conflict_issue173.3.query.sqlpp
@@ -21,6 +21,8 @@
* Expected Result: Success (ignoring duplicates) with a warning reporting that there is a duplicate field name "name"
* Author: zheilbron
*/
+// requesttype=application/json
+// param max-warnings:json=10
use test;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.1.query.sqlpp
index 13d9fff..658c97c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.1.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Testing object constructor without field names
* Expected Res : Success
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 2) x, range(3, 4) y
select value { x, y }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.3.query.sqlpp
index e6ec490..caf17f9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/no_fieldname_constr/no_fieldname_constr.3.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Testing object constructor without field names
* Expected Res : Success with a warning reporting that there is a duplicate field name
*/
+// requesttype=application/json
+// param max-warnings:json=10
from (
from range(1, 2) x
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.04.query.sqlpp
index 39d6369..7230127 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.04.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.04.query.sqlpp
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=10
use test;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.06.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.06.query.sqlpp
index 0df4cd6..9b25e36 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.06.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.06.query.sqlpp
@@ -16,5 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=10
select value {"name": "Sam", lowercase('NAME'): "John"};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.07.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.07.query.sqlpp
index b6e9e5b..5d8dfb8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.07.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.07.query.sqlpp
@@ -16,5 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=10
select value {"name": "Sam", "f1": {"id": 3, "id2": 7, "id": 8}};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.08.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.08.query.sqlpp
index 14bd59c..eb62882 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.08.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.08.query.sqlpp
@@ -16,5 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=10
select value {"name": "Sam", "f1": {"id": 3, "id2": 5}, "f2": "str", "f1": 8};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.09.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.09.query.sqlpp
index 48db565..268f19e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.09.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.09.query.sqlpp
@@ -16,5 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=10
select value {"name": "Sam", "f1": {"id": 3, "id2": 5, "id": "sth"}, "f2": "str", "f1": 8};
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.10.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.10.query.sqlpp
index 386b187..d111380 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.10.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_duplicate_fields/object_duplicate_fields.10.query.sqlpp
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// requesttype=application/json
+// param max-warnings:json=20
use test;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.1.query.sqlpp
index 2b70df1..48ecb80 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.1.query.sqlpp
@@ -22,6 +22,8 @@
* : but cannot be applied for a given aggregate function
* Expected : SUCCESS (with HYR10006 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
with ds as (
from range(1, 4) r
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.2.query.sqlpp
index d0d6c1a..6578500 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.2.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.2.query.sqlpp
@@ -22,6 +22,8 @@
* : but not applicable for GROUP BY
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
with ds as (
from range(1, 4) r
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.3.query.sqlpp
index daab311..26e09f2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.3.query.sqlpp
@@ -22,6 +22,8 @@
* : but not applicable for relational expression
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r /*+ hash */ < 2
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.4.query.sqlpp
index cc8c8df..2e14cb4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.4.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.4.query.sqlpp
@@ -22,6 +22,8 @@
* : but not applicable for BETWEEN
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r /*+ auto */ between 0 and 1
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.5.query.sqlpp
index a19aeec..c234a7f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.5.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.5.query.sqlpp
@@ -22,6 +22,8 @@
* : but not applicable for function call
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where /*+ hash */ tostring(r) < "2"
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.6.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.6.query.sqlpp
index b669569..e4e666a 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.6.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/inapplicable-hint-warning/inapplicable-hint-warning.6.query.sqlpp
@@ -22,6 +22,8 @@
* : but no hints applicable at this location
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r < 2
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.1.query.sqlpp
index 90c5419..549c589 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.1.query.sqlpp
@@ -17,6 +17,7 @@
* under the License.
*/
-SET `compiler.runtime.warnings` "10";
+// requesttype=application/json
+// param max-warnings:json=10
SELECT VALUE ARRAY_MIN([1, '2']);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.2.query.sqlpp
index 5775d55..b385b89 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.2.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/min-max-incompatible-types/min-max-incompatible-types.2.query.sqlpp
@@ -17,6 +17,7 @@
* under the License.
*/
-SET `compiler.runtime.warnings` "1000";
+// requesttype=application/json
+// param max-warnings:json=20
SELECT VALUE MIN(ds.InternalDetails) FROM Metadata.`Dataset` ds;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/plan-warning/plan-warning.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/plan-warning/plan-warning.1.query.sqlpp
index 1e3d045..a240d88 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/plan-warning/plan-warning.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/plan-warning/plan-warning.1.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning if cross product
* Expected : SUCCESS (with HYR10007 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
with ds as (
from range(1, 4) r
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.1.query.sqlpp
index eb2bfd9..250a0ec 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.1.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning when a GROUP BY hint is not recognized
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
with ds as (
from range(1, 4) r
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.2.query.sqlpp
index 3e89bb0..769f96c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.2.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.2.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning when a relational expression hint is not recognized
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r /*+ unknown_hint_relexpr */ < 2
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.3.query.sqlpp
index ebef6d3..7ed3458 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.3.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning when a BETWEEN hint is not recognized
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r /*+ unknown_hint_between */ between 0 and 1
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.4.query.sqlpp
index c80b17e..748ece2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.4.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.4.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning when a function call hint is not recognized
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where /*+ unknown_hint_funcall */ tostring(r) < "2"
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.5.query.sqlpp
index 517e39b..4db0e2b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.5.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/unknown-hint-warning/unknown-hint-warning.5.query.sqlpp
@@ -21,6 +21,8 @@
* Description : Warning when a hint is not recognized elsewhere
* Expected : SUCCESS (with ASX1107 warning)
*/
+// requesttype=application/json
+// param max-warnings:json=10
from range(1, 4) r
where r < 2
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.01.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.01.ddl.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.01.ddl.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.01.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.02.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.02.update.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.02.update.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.02.update.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.03.post.http
similarity index 80%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.03.post.http
index 804c80d..f63c9be 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.03.post.http
@@ -18,8 +18,8 @@
*/
/*
* Description : test limiting number of reported runtime warnings
- * Expected Result : success with 10 runtime warnings count
+ * Expected Result : success with 12 warnings count & 3 warnings reported
*/
-- requesttype=application/json
/query/service
---body={"statement":"USE test; SET `compiler.runtime.warnings` \"3\"; SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;"}
\ No newline at end of file
+--body={"statement":"USE test; SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;", "max-warnings":3}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.04.post.http
similarity index 81%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.04.post.http
index b2ed679..f639978 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.04.post.http
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : test limiting number of reported runtime warnings (DEFAULT)
- * Expected Result : success with 10 runtime warnings count
+ * Description : test limiting number of reported runtime warnings
+ * Expected Result : success with 10 warnings count & 0 reported warnings
*/
-- requesttype=application/json
/query/service
---body={"statement":"USE test; SELECT {\"a\":1 , \"a\":2} as F1, isbitset(6, ds.f) AS F2 FROM ds order by ds.id;"}
\ No newline at end of file
+--body={"statement":"USE test; SELECT {\"a\":1 } as F1, isbitset(6, ds.f) AS F2 FROM ds order by ds.id;", "max-warnings":0}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.05.post.http
similarity index 94%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.05.post.http
index b2ed679..b210c44 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.05.post.http
@@ -18,7 +18,7 @@
*/
/*
* Description : test limiting number of reported runtime warnings (DEFAULT)
- * Expected Result : success with 10 runtime warnings count
+ * Expected Result : success with 11 warnings count
*/
-- requesttype=application/json
/query/service
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.06.post.http
similarity index 77%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.06.post.http
index 804c80d..a2808dc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.06.post.http
@@ -18,8 +18,8 @@
*/
/*
* Description : test limiting number of reported runtime warnings
- * Expected Result : success with 10 runtime warnings count
+ * Expected Result : success with 2 warnings count & 2 warnings reported (all parser & compile-time warnings)
*/
-- requesttype=application/json
/query/service
---body={"statement":"USE test; SET `compiler.runtime.warnings` \"3\"; SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;"}
\ No newline at end of file
+--body={"statement":"USE test; EXPLAIN SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;", "max-warnings":14}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.07.post.http
similarity index 86%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.07.post.http
index b2ed679..cef4d3d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.05.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.07.post.http
@@ -17,9 +17,9 @@
* under the License.
*/
/*
- * Description : test limiting number of reported runtime warnings (DEFAULT)
- * Expected Result : success with 10 runtime warnings count
+ * Description : test limiting number of reported runtime warnings
+ * Expected Result : success with 11 warnings count & 0 reported warnings
*/
-- requesttype=application/json
/query/service
---body={"statement":"USE test; SELECT {\"a\":1 , \"a\":2} as F1, isbitset(6, ds.f) AS F2 FROM ds order by ds.id;"}
\ No newline at end of file
+--body={"statement":"USE test; SELECT {\"a\":1 , \"a\":2} as F1, isbitset(6, ds.f) AS F2 FROM ds order by ds.id;", "max-warnings":-3}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.08.post.http
similarity index 80%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.08.post.http
index 804c80d..b17e173 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.03.post.http
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.08.post.http
@@ -18,8 +18,8 @@
*/
/*
* Description : test limiting number of reported runtime warnings
- * Expected Result : success with 10 runtime warnings count
+ * Expected Result : success with 12 warnings count & 3 warnings reported
*/
-- requesttype=application/json
/query/service
---body={"statement":"USE test; SET `compiler.runtime.warnings` \"3\"; SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;"}
\ No newline at end of file
+--body={"statement":"USE test; SELECT {\"a\":1, \"a\":2} as F1, isbitset(6, ds.f) AS F2 \/*+ hint*\/ FROM ds order by ds.id;", "max-warnings":"3"}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.06.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.09.ddl.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.06.ddl.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings-limit/warnings-limit.09.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.04.post.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.04.post.http
deleted file mode 100644
index 3c308e1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/warnings/warnings_limit/warnings_limit.04.post.http
+++ /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.
- */
-/*
- * Description : test limiting number of reported runtime warnings
- * Expected Result : success with 10 runtime warnings count
- */
--- requesttype=application/json
-/query/service
---body={"statement":"USE test; SET `compiler.runtime.warnings` \"0\"; SELECT {\"a\":1 } as F1, isbitset(6, ds.f) AS F2 FROM ds order by ds.id;"}
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index 31eeba0..a23829f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -12,7 +12,6 @@
"compiler\.groupmemory" : 163840,
"compiler\.joinmemory" : 262144,
"compiler\.parallelism" : 0,
- "compiler\.runtime\.warnings" : 0,
"compiler\.sort\.parallel" : false,
"compiler\.sort\.samples" : 100,
"compiler\.sortmemory" : 327680,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index b913a81..48e92b0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -12,7 +12,6 @@
"compiler\.groupmemory" : 163840,
"compiler\.joinmemory" : 262144,
"compiler\.parallelism" : -1,
- "compiler\.runtime\.warnings" : 0,
"compiler\.sort\.parallel" : true,
"compiler\.sort\.samples" : 100,
"compiler\.sortmemory" : 327680,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index f4ab69a..b631b8c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -12,7 +12,6 @@
"compiler\.groupmemory" : 163840,
"compiler\.joinmemory" : 262144,
"compiler\.parallelism" : 3,
- "compiler\.runtime\.warnings" : 0,
"compiler\.sort\.parallel" : true,
"compiler\.sort\.samples" : 100,
"compiler\.sortmemory" : 327680,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
similarity index 72%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm
rename to asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
index ae67f93..d67e7a1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
@@ -21,11 +21,11 @@
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"warnings": [{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1107: Unexpected hint: hint. None expected at this location\E[^}]+\Q}\E\s*
\s*\Q,{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1006: Duplicate field name \"a\"\E[^}]+\Q}\E\s*
\s*\Q,{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX0002: Type mismatch: function isbitset expects its 2nd input parameter to be of type bigint or array, but the actual input type is string\E[^}]+\Q}\E\s*
\s*\Q],\E
\s*\Q"status": "success",\E
\s*\Q"metrics": {\E
@@ -34,6 +34,6 @@
\s*\Q"resultCount": \E[0-9]+\Q,\E
\s*\Q"resultSize": \E[0-9]+\Q,\E
\s*\Q"processedObjects": \E[0-9]+\Q,\E
-\s*\Q"warningCount": 10\E
+\s*\Q"warningCount": 12\E
\s*\Q}\E
\s*\Q}\E\s*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.04.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.04.regexadm
rename to asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
similarity index 89%
rename from asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm
rename to asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
index 3637bde..5c477e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
@@ -20,9 +20,6 @@
\s*\Q]\E
\s*\Q,\E
\s*\Q"plans":{},\E
-\s*\Q"warnings": [{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
-\s*\Q],\E
\s*\Q"status": "success",\E
\s*\Q"metrics": {\E
\s*\Q"elapsedTime": "\E[^"]+\Q",\E
@@ -30,6 +27,6 @@
\s*\Q"resultCount": \E[0-9]+\Q,\E
\s*\Q"resultSize": \E[0-9]+\Q,\E
\s*\Q"processedObjects": \E[0-9]+\Q,\E
-\s*\Q"warningCount": 10\E
+\s*\Q"warningCount": 11\E
\s*\Q}\E
\s*\Q}\E\s*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.06.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.06.regexadm
new file mode 100644
index 0000000..64a3bde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.06.regexadm
@@ -0,0 +1,20 @@
+\Q{\E
+\s*\Q"requestID": "\E[a-zA-Z0-9-]+\Q",\E
+\s*\Q"signature": {\E
+\s*\Q"*": "*"\E
+\s*\Q},\E
+\s*\Q"results": [ {\E.*warnings\Q": [{\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1107: Unexpected hint: hint. None expected at this location\E[^}]+\Q}\E\s*
+\s*\Q,{\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1006: Duplicate field name \"a\"\E[^}]+\Q}\E\s*
+\s*\Q],\E
+\s*\Q"status": "success",\E
+\s*\Q"metrics": {\E
+\s*\Q"elapsedTime": "\E[^"]+\Q",\E
+\s*\Q"executionTime": "\E[^"]+\Q",\E
+\s*\Q"resultCount": \E[0-9]+\Q,\E
+\s*\Q"resultSize": \E[0-9]+\Q,\E
+\s*\Q"processedObjects": \E[0-9]+\Q,\E
+\s*\Q"warningCount": 2\E
+\s*\Q}\E
+\s*\Q}\E\s*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
similarity index 89%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm
copy to asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
index 3637bde..5c477e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.05.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
@@ -20,9 +20,6 @@
\s*\Q]\E
\s*\Q,\E
\s*\Q"plans":{},\E
-\s*\Q"warnings": [{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
-\s*\Q],\E
\s*\Q"status": "success",\E
\s*\Q"metrics": {\E
\s*\Q"elapsedTime": "\E[^"]+\Q",\E
@@ -30,6 +27,6 @@
\s*\Q"resultCount": \E[0-9]+\Q,\E
\s*\Q"resultSize": \E[0-9]+\Q,\E
\s*\Q"processedObjects": \E[0-9]+\Q,\E
-\s*\Q"warningCount": 10\E
+\s*\Q"warningCount": 11\E
\s*\Q}\E
\s*\Q}\E\s*
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
similarity index 71%
copy from asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm
copy to asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
index ae67f93..d67e7a1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings_limit/warnings_limit.03.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
@@ -21,11 +21,11 @@
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"warnings": [{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1107: Unexpected hint: hint. None expected at this location\E[^}]+\Q}\E\s*
\s*\Q,{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX1006: Duplicate field name \"a\"\E[^}]+\Q}\E\s*
\s*\Q,{\E\s*
-\s*\Q"code": 1,\E\s*\Q"msg": "\E[^}]+\Q}\E\s*
+\s*\Q"code": 1,\E\s*\Q"msg": "ASX0002: Type mismatch: function isbitset expects its 2nd input parameter to be of type bigint or array, but the actual input type is string\E[^}]+\Q}\E\s*
\s*\Q],\E
\s*\Q"status": "success",\E
\s*\Q"metrics": {\E
@@ -34,6 +34,6 @@
\s*\Q"resultCount": \E[0-9]+\Q,\E
\s*\Q"resultSize": \E[0-9]+\Q,\E
\s*\Q"processedObjects": \E[0-9]+\Q,\E
-\s*\Q"warningCount": 10\E
+\s*\Q"warningCount": 12\E
\s*\Q}\E
\s*\Q}\E\s*
\ 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 a7bade2..6e06bda 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -121,8 +121,8 @@
<compilation-unit name="query-ASTERIXDB-2446">
<output-dir compare="Text">query-ASTERIXDB-2446</output-dir>
<expected-error>ASX0013: Duplicate field name "a"</expected-error>
- <expected-warn>Duplicate field name "c" (in line 26, at column 84)</expected-warn>
- <expected-warn>Duplicate field name "e" (in line 26, at column 116)</expected-warn>
+ <expected-warn>Duplicate field name "c" (in line 28, at column 84)</expected-warn>
+ <expected-warn>Duplicate field name "e" (in line 28, at column 116)</expected-warn>
</compilation-unit>
</test-case>
<test-case FilePath="flwor">
@@ -12503,8 +12503,8 @@
</compilation-unit>
</test-case>
<test-case FilePath="warnings">
- <compilation-unit name="warnings_limit">
- <output-dir compare="Clean-JSON">warnings_limit</output-dir>
+ <compilation-unit name="warnings-limit">
+ <output-dir compare="Clean-JSON">warnings-limit</output-dir>
</compilation-unit>
</test-case>
</test-group>
@@ -12512,136 +12512,136 @@
<test-case FilePath="fun_return_null" check-warnings="true">
<compilation-unit name="fun_return_null_01">
<output-dir compare="Text">fun_return_null_01</output-dir>
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 33, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 44, at column 1)</expected-warn>
+
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 33, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 44, at column 1)</expected-warn>
+
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 33, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
<expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 32, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function contains expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
<expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 43, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 32, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function contains expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 32, at column 1)</expected-warn>
-
- <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 32, at column 1)</expected-warn>
-
- <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 33, at column 1)</expected-warn>
</compilation-unit>
</test-case>
<test-case FilePath="fun_return_null" check-warnings="true">
<compilation-unit name="fun_return_null_02">
<output-dir compare="Text">fun_return_null_02</output-dir>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 41, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 51, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 47, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 42, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 45, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 53, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 43, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 50, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 40, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 55, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 56, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 33, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 44, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 37, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 34, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 48, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 46, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 52, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 57, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 31, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 36, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 54, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 28, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 30, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 38, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 35, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 39, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 32, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 29, at column 1)</expected-warn>
- <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 49, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 42, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-replace expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 52, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 48, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function position expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 43, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 2nd input parameter to be of type string, but the actual input type is integer (in line 46, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function replace expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 54, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function starts-with expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 44, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 51, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function rtrim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 41, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-after expects its 2nd input parameter to be of type string, but the actual input type is bigint (in line 56, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function substring-before expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 57, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function lowercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 34, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ends-with expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 45, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 38, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function uppercase expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 35, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-like expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 49, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function matches expects its 3rd input parameter to be of type string, but the actual input type is tinyint (in line 47, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-equal expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 53, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function split expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 58, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-to-codepoint expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 32, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function trim expects its 1st input parameter to be of type string, but the actual input type is integer (in line 37, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function reverse expects its 1st input parameter to be of type string, but the actual input type is integer (in line 55, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 29, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function contains expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 31, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 1st input parameter to be of type string, but the actual input type is smallint (in line 39, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function initcap expects its 1st input parameter to be of type string, but the actual input type is bigint (in line 36, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function ltrim expects its 2nd input parameter to be of type string, but the actual input type is tinyint (in line 40, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function string-length expects its 1st input parameter to be of type string, but the actual input type is integer (in line 33, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function like expects its 1st input parameter to be of type string, but the actual input type is tinyint (in line 30, at column 1)</expected-warn>
+ <expected-warn>Type mismatch: function regexp-position expects its 1st input parameter to be of type string, but the actual input type is integer (in line 50, at column 1)</expected-warn>
</compilation-unit>
</test-case>
</test-group>
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
index f30956e..9428e6f 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
@@ -24,7 +24,6 @@
import static org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.UNSIGNED_INTEGER;
-import static org.apache.hyracks.control.common.config.OptionTypes.UNSIGNED_LONG;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
@@ -74,8 +73,7 @@
COMPILER_SORT_SAMPLES(
POSITIVE_INTEGER,
AlgebricksConfig.SORT_SAMPLES,
- "The number of samples which parallel sorting should take from each partition"),
- COMPILER_RUNTIME_WARNINGS(UNSIGNED_LONG, 0L, "The maximum number of runtime warnings to be reported");
+ "The number of samples which parallel sorting should take from each partition");
private final IOptionType type;
private final Object defaultValue;
@@ -129,8 +127,6 @@
public static final String COMPILER_SORT_SAMPLES_KEY = Option.COMPILER_SORT_SAMPLES.ini();
- public static final String COMPILER_RUNTIME_WARNINGS_KEY = Option.COMPILER_RUNTIME_WARNINGS.ini();
-
public static final int COMPILER_PARALLELISM_AS_STORAGE = 0;
public CompilerProperties(PropertiesAccessor accessor) {
@@ -177,8 +173,4 @@
public int getSortSamples() {
return accessor.getInt(Option.COMPILER_SORT_SAMPLES);
}
-
- public long getNumRuntimeWarnings() {
- return accessor.getLong(Option.COMPILER_RUNTIME_WARNINGS);
- }
}
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
index 93ab5db..23fdcac 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
@@ -59,7 +59,6 @@
int textSearchFrameLimit = getTextSearchNumFrames(compilerProperties, querySpecificConfig, sourceLoc);
int sortNumSamples = getSortSamples(compilerProperties, querySpecificConfig, sourceLoc);
boolean fullParallelSort = getSortParallel(compilerProperties, querySpecificConfig);
- long runtimeWarningsLimit = getRuntimeWarningsLimit(compilerProperties, querySpecificConfig, sourceLoc);
PhysicalOptimizationConfig physOptConf = new PhysicalOptimizationConfig();
physOptConf.setFrameSize(frameSize);
@@ -70,7 +69,6 @@
physOptConf.setMaxFramesForTextSearch(textSearchFrameLimit);
physOptConf.setSortParallel(fullParallelSort);
physOptConf.setSortSamples(sortNumSamples);
- physOptConf.setRuntimeWarningsLimit(runtimeWarningsLimit);
return physOptConf;
}
@@ -131,17 +129,4 @@
CompilerProperties.COMPILER_SORT_SAMPLES_KEY, 1, "samples");
}
}
-
- @SuppressWarnings("squid:S1166") // Either log or rethrow this exception
- private static long getRuntimeWarningsLimit(CompilerProperties compilerProperties,
- Map<String, Object> querySpecificConfig, SourceLocation sourceLoc) throws AsterixException {
- String valueInQuery = (String) querySpecificConfig.get(CompilerProperties.COMPILER_RUNTIME_WARNINGS_KEY);
- try {
- return valueInQuery == null ? compilerProperties.getNumRuntimeWarnings()
- : OptionTypes.UNSIGNED_LONG.parse(valueInQuery);
- } catch (IllegalArgumentException e) {
- throw AsterixException.create(ErrorCode.COMPILATION_BAD_QUERY_PARAMETER_VALUE, sourceLoc,
- CompilerProperties.COMPILER_RUNTIME_WARNINGS_KEY, 0, "warnings");
- }
- }
}
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningCollector.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningCollector.java
index 53fa760..47a0344 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningCollector.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningCollector.java
@@ -20,18 +20,26 @@
package org.apache.asterix.common.exceptions;
import java.util.Collection;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.api.exceptions.Warning;
+import org.apache.hyracks.util.annotations.NotThreadSafe;
+/**
+ * A warning collector that collects warnings up to {@link Long#MAX_VALUE} by default.
+ */
+@NotThreadSafe
public final class WarningCollector implements IWarningCollector {
- private final Set<Warning> warnings = new HashSet<>();
+ private final Set<Warning> warnings = new LinkedHashSet<>();
+ private long maxWarnings = Long.MAX_VALUE;
+ private long totalWarningsCount;
public void clear() {
warnings.clear();
+ totalWarningsCount = 0;
}
@Override
@@ -41,28 +49,30 @@
@Override
public boolean shouldWarn() {
- // this warning collector currently always collects warnings
- return true;
+ return totalWarningsCount < Long.MAX_VALUE && totalWarningsCount++ < maxWarnings;
}
@Override
public long getTotalWarningsCount() {
- return warnings.size();
+ return totalWarningsCount;
}
- public void warn(Collection<Warning> warnings) {
- this.warnings.addAll(warnings);
- }
-
- public void getWarnings(Collection<? super Warning> outWarnings) {
- outWarnings.addAll(warnings);
+ public void getWarnings(Collection<? super Warning> outWarnings, long maxWarnings) {
+ long i = 0;
+ for (Warning warning : warnings) {
+ if (i >= maxWarnings) {
+ break;
+ }
+ outWarnings.add(warning);
+ i++;
+ }
}
public void getWarnings(IWarningCollector outWarningCollector) {
- for (Warning warning : warnings) {
- if (outWarningCollector.shouldWarn()) {
- outWarningCollector.warn(warning);
- }
- }
+ WarningUtil.mergeWarnings(warnings, outWarningCollector);
+ }
+
+ public void setMaxWarnings(long maxWarnings) {
+ this.maxWarnings = maxWarnings;
}
}
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningUtil.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningUtil.java
index 3ea3877..6a369ef 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningUtil.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/WarningUtil.java
@@ -19,7 +19,9 @@
package org.apache.asterix.common.exceptions;
import java.io.Serializable;
+import java.util.Collection;
+import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.api.exceptions.SourceLocation;
import org.apache.hyracks.api.exceptions.Warning;
import org.apache.hyracks.api.util.ErrorMessageUtil;
@@ -33,4 +35,13 @@
return Warning.of(ErrorCode.ASTERIX, srcLocation, code, ErrorMessageUtil.formatMessage(ErrorCode.ASTERIX, code,
ErrorCode.getErrorMessage(code), srcLocation, params));
}
+
+ /** Merges the warnings from the collection argument into the warning collector argument. */
+ public static void mergeWarnings(Collection<Warning> warnings, IWarningCollector warningsCollector) {
+ for (Warning warning : warnings) {
+ if (warningsCollector.shouldWarn()) {
+ warningsCollector.warn(warning);
+ }
+ }
+ }
}
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index 940c2d9..8d1a8cd 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -349,7 +349,6 @@
| common | compiler.sort.samples | The number of samples taken from each partition to guide the sort operation when full parallel sort is enabled | 100 |
| common | compiler.textsearchmemory | The memory budget (in bytes) for an inverted-index-search operator instance in a partition | 33554432 (32 MB) |
| common | compiler.windowmemory | The memory budget (in bytes) for a window operator instance in a partition | 33554432 (32 MB) |
-| common | compiler.runtime.warnings | The maximum number of runtime warnings to be reported | 0 |
| common | log.level | The logging level for master and slave processes | WARNING |
| common | max.wait.active.cluster | The max pending time (in seconds) for cluster startup. After the threshold, if the cluster still is not up and running, it is considered unavailable | 60 |
| common | messaging.frame.count | Number of reusable frames for NC to NC messaging | 512 |
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
index 2f9eb9f..662a3f9 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
@@ -29,8 +29,15 @@
List<Statement> parse() throws CompilationException;
/**
- * Gets the warnings generated during parsing
+ * Gets the warnings generated during parsing up to the max number argument.
*/
- default void getWarnings(Collection<? super Warning> outWarnings) {
+ default void getWarnings(Collection<? super Warning> outWarnings, long maxWarnings) {
+ }
+
+ /**
+ * Gets the count of all warnings generated during parsing.
+ */
+ default long getTotalWarningsCount() {
+ return 0L;
}
}
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index 1dc30fd..60cdf2e 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -354,8 +354,13 @@
}
@Override
- public void getWarnings(Collection<? super Warning> outWarnings) {
- warningCollector.getWarnings(outWarnings);
+ public void getWarnings(Collection<? super Warning> outWarnings, long maxWarnings) {
+ warningCollector.getWarnings(outWarnings, maxWarnings);
+ }
+
+ @Override
+ public long getTotalWarningsCount() {
+ return warningCollector.getTotalWarningsCount();
}
protected String getMessage(ParseException pe) {
diff --git a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
index a95e813..dbc859c 100644
--- a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
+++ b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/AbstractCompilerFactoryBuilder.java
@@ -71,6 +71,7 @@
protected PhysicalOptimizationConfig physicalOptimizationConfig = new PhysicalOptimizationConfig();
protected AlgebricksAbsolutePartitionConstraint clusterLocations;
protected IWarningCollector warningCollector;
+ protected long maxWarnings;
public abstract ICompilerFactory create();
@@ -251,4 +252,12 @@
public IWarningCollector getWarningCollector() {
return warningCollector;
}
+
+ public void setMaxWarnings(long maxWarnings) {
+ this.maxWarnings = maxWarnings;
+ }
+
+ public long getMaxWarnings() {
+ return maxWarnings;
+ }
}
diff --git a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
index 5c5f9a9..d51c363 100644
--- a/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
+++ b/hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/api/HeuristicCompilerFactoryBuilder.java
@@ -104,7 +104,7 @@
normalizedKeyComputerFactoryProvider, expressionRuntimeProvider, expressionTypeComputer,
oc, expressionEvalSizeComputer, partialAggregationTypeComputer,
predEvaluatorFactoryProvider, physicalOptimizationConfig.getFrameSize(),
- clusterLocations, physicalOptimizationConfig.getRuntimeWarningsLimit());
+ clusterLocations, maxWarnings);
PlanCompiler pc = new PlanCompiler(context);
return pc.compilePlan(plan, jobEventListenerFactory);
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
index d2d5ae1..ae333e2 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/JobGenContext.java
@@ -70,7 +70,7 @@
private AlgebricksAbsolutePartitionConstraint clusterLocations;
private int varCounter;
private final ITypingContext typingContext;
- private final long runtimeWarningsLimit;
+ private final long maxWarnings;
public JobGenContext(IOperatorSchema outerFlowSchema, IMetadataProvider<?, ?> metadataProvider, Object appContext,
ISerializerDeserializerProvider serializerDeserializerProvider,
@@ -85,7 +85,7 @@
ITypingContext typingContext, IExpressionEvalSizeComputer expressionEvalSizeComputer,
IPartialAggregationTypeComputer partialAggregationTypeComputer,
IPredicateEvaluatorFactoryProvider predEvaluatorFactoryProvider, int frameSize,
- AlgebricksAbsolutePartitionConstraint clusterLocations, long runtimeWarningsLimit) {
+ AlgebricksAbsolutePartitionConstraint clusterLocations, long maxWarnings) {
this.outerFlowSchema = outerFlowSchema;
this.metadataProvider = metadataProvider;
this.appContext = appContext;
@@ -108,7 +108,7 @@
this.predEvaluatorFactoryProvider = predEvaluatorFactoryProvider;
this.frameSize = frameSize;
this.varCounter = 0;
- this.runtimeWarningsLimit = runtimeWarningsLimit;
+ this.maxWarnings = maxWarnings;
}
public IOperatorSchema getOuterFlowSchema() {
@@ -209,7 +209,7 @@
return typingContext.getOutputTypeEnvironment(op);
}
- public long getRuntimeWarningsLimit() {
- return runtimeWarningsLimit;
+ public long getMaxWarnings() {
+ return maxWarnings;
}
}
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/PlanCompiler.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/PlanCompiler.java
index 2b2428c..2ef5c6c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/PlanCompiler.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/jobgen/impl/PlanCompiler.java
@@ -60,7 +60,7 @@
private JobSpecification compilePlanImpl(ILogicalPlan plan, boolean isNestedPlan, IOperatorSchema outerPlanSchema,
IJobletEventListenerFactory jobEventListenerFactory) throws AlgebricksException {
JobSpecification spec = new JobSpecification(context.getFrameSize());
- spec.setRuntimeWarningsLimit(context.getRuntimeWarningsLimit());
+ spec.setMaxWarnings(context.getMaxWarnings());
if (jobEventListenerFactory != null) {
spec.setJobletEventListenerFactory(jobEventListenerFactory);
}
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/PhysicalOptimizationConfig.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/PhysicalOptimizationConfig.java
index f72da84..598497c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/PhysicalOptimizationConfig.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/PhysicalOptimizationConfig.java
@@ -39,7 +39,6 @@
private static final String DEFAULT_IN_MEM_HASH_JOIN_TABLE_SIZE = "DEFAULT_IN_MEM_HASH_JOIN_TABLE_SIZE";
private static final String SORT_PARALLEL = "SORT_PARALLEL";
private static final String SORT_SAMPLES = "SORT_SAMPLES";
- private static final String RUNTIME_WARNINGS_LIMIT = "RUNTIME_WARNINGS_LIMIT";
private Properties properties = new Properties();
@@ -173,14 +172,6 @@
setInt(SORT_SAMPLES, sortSamples);
}
- public long getRuntimeWarningsLimit() {
- return getLong(RUNTIME_WARNINGS_LIMIT, 0);
- }
-
- public void setRuntimeWarningsLimit(long runtimeWarningsLimit) {
- setLong(RUNTIME_WARNINGS_LIMIT, runtimeWarningsLimit);
- }
-
private void setInt(String property, int value) {
properties.setProperty(property, Integer.toString(value));
}
@@ -190,15 +181,6 @@
return value == null ? defaultValue : Integer.parseInt(value);
}
- private void setLong(String property, long value) {
- properties.setProperty(property, Long.toString(value));
- }
-
- private long getLong(String property, long defaultValue) {
- String value = properties.getProperty(property);
- return value == null ? defaultValue : Long.parseLong(value);
- }
-
private void setDouble(String property, double value) {
properties.setProperty(property, Double.toString(value));
}
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/JobSpecificationActivityClusterGraphGeneratorFactory.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/JobSpecificationActivityClusterGraphGeneratorFactory.java
index d71ac57..eb68e79 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/JobSpecificationActivityClusterGraphGeneratorFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/JobSpecificationActivityClusterGraphGeneratorFactory.java
@@ -72,7 +72,7 @@
final ActivityClusterGraph acg = acgb.inferActivityClusters(jag);
acg.setFrameSize(spec.getFrameSize());
acg.setMaxReattempts(spec.getMaxReattempts());
- acg.setRuntimeWarningsLimit(spec.getRuntimeWarningsLimit());
+ acg.setMaxWarnings(spec.getMaxWarnings());
acg.setJobletEventListenerFactory(spec.getJobletEventListenerFactory());
acg.setGlobalJobDataFactory(spec.getGlobalJobDataFactory());
acg.setConnectorPolicyAssignmentPolicy(spec.getConnectorPolicyAssignmentPolicy());
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
index e4e4ff7..5fcae6b 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityClusterGraph.java
@@ -46,7 +46,7 @@
private int frameSize;
- private long runtimeWarningsLimit;
+ private long maxWarnings;
private int maxReattempts;
@@ -106,12 +106,12 @@
return frameSize;
}
- public void setRuntimeWarningsLimit(long runtimeWarningsLimit) {
- this.runtimeWarningsLimit = runtimeWarningsLimit;
+ public void setMaxWarnings(long maxWarnings) {
+ this.maxWarnings = maxWarnings;
}
- public long getRuntimeWarningsLimit() {
- return runtimeWarningsLimit;
+ public long getMaxWarnings() {
+ return maxWarnings;
}
public void setMaxReattempts(int maxReattempts) {
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
index cd8277a..58336a0 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
@@ -77,7 +77,7 @@
private int maxReattempts;
- private long runtimeWarningsLimit;
+ private long maxWarnings;
private IJobletEventListenerFactory jobletEventListenerFactory;
@@ -262,12 +262,12 @@
return frameSize;
}
- public void setRuntimeWarningsLimit(long runtimeWarningsLimit) {
- this.runtimeWarningsLimit = runtimeWarningsLimit;
+ public void setMaxWarnings(long maxWarnings) {
+ this.maxWarnings = maxWarnings;
}
- public long getRuntimeWarningsLimit() {
- return runtimeWarningsLimit;
+ public long getMaxWarnings() {
+ return maxWarnings;
}
public void setMaxReattempts(int maxReattempts) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
index 0a378b0..7088e08 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
@@ -362,28 +362,6 @@
}
};
- public static final IOptionType<Long> UNSIGNED_LONG = new IOptionType<Long>() {
- @Override
- public Long parse(String s) {
- return Long.parseUnsignedLong(s);
- }
-
- @Override
- public Long parse(JsonNode node) {
- return node.isNull() ? null : parse(node.asText());
- }
-
- @Override
- public Class<Long> targetType() {
- return Long.class;
- }
-
- @Override
- public void serializeJSONField(String fieldName, Object value, ObjectNode node) {
- node.put(fieldName, (long) value);
- }
- };
-
public static final IOptionType<Integer> POSITIVE_INTEGER = new IOptionType<Integer>() {
@Override
public Integer parse(String s) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Joblet.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Joblet.java
index d9b3961..35cf57f 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Joblet.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Joblet.java
@@ -105,7 +105,7 @@
private final long jobStartTime;
- private final long runtimeWarningsLimit;
+ private final long maxWarnings;
public Joblet(NodeControllerService nodeController, DeploymentId deploymentId, JobId jobId,
INCServiceContext serviceCtx, ActivityClusterGraph acg,
@@ -136,7 +136,7 @@
IGlobalJobDataFactory gjdf = acg.getGlobalJobDataFactory();
globalJobData = gjdf != null ? gjdf.createGlobalJobData(this) : null;
this.jobStartTime = jobStartTime;
- this.runtimeWarningsLimit = acg.getRuntimeWarningsLimit();
+ this.maxWarnings = acg.getMaxWarnings();
}
@Override
@@ -267,8 +267,8 @@
return frameManager.getInitialFrameSize();
}
- public final long getRuntimeWarningsLimit() {
- return runtimeWarningsLimit;
+ public final long getMaxWarnings() {
+ return maxWarnings;
}
public IIOManager getIOManager() {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
index 00de038..8a6389a 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
@@ -150,7 +150,7 @@
this.inputChannelsFromConnectors = inputChannelsFromConnectors;
statsCollector = new StatsCollector();
warnings = ConcurrentHashMap.newKeySet();
- warningCollector = createWarningCollector(joblet.getRuntimeWarningsLimit());
+ warningCollector = createWarningCollector(joblet.getMaxWarnings());
}
public void setTaskRuntime(IPartitionCollector[] collectors, IOperatorNodePushable operator) {
@@ -531,7 +531,7 @@
return warnings;
}
- private IWarningCollector createWarningCollector(long warningsLimit) {
+ private IWarningCollector createWarningCollector(long maxWarnings) {
return new IWarningCollector() {
private final AtomicLong warningsCount = new AtomicLong();
@@ -544,7 +544,7 @@
@Override
public boolean shouldWarn() {
long currentCount = warningsCount.getAndUpdate(count -> count < Long.MAX_VALUE ? count + 1 : count);
- return currentCount < warningsLimit;
+ return currentCount < maxWarnings;
}
@Override