[NO ISSUE][*DB][COMP] JSON record can only have expressions [%1$s, %2$s, %3$s]
Change-Id: Ie11c29b12e0719d50c09a80a49376883f248c683
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/13844
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
index 28639c1..0b9c895 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
@@ -70,10 +70,10 @@
case LIST_CONSTRUCTOR_EXPRESSION:
return parseList((ListConstructor) expr);
default:
- throw new RuntimeDataException(ErrorCode.PARSE_ERROR, NOT_ALLOWED_EXPRESSIONS_ERROR_MESSAGE,
- Expression.Kind.LITERAL_EXPRESSION.toString(),
- Expression.Kind.RECORD_CONSTRUCTOR_EXPRESSION.toString(),
- Expression.Kind.LIST_CONSTRUCTOR_EXPRESSION.toString());
+ throw new RuntimeDataException(ErrorCode.PARSE_ERROR,
+ String.format(NOT_ALLOWED_EXPRESSIONS_ERROR_MESSAGE, Expression.Kind.LITERAL_EXPRESSION,
+ Expression.Kind.RECORD_CONSTRUCTOR_EXPRESSION,
+ Expression.Kind.LIST_CONSTRUCTOR_EXPRESSION));
}
}