You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2026/10/07 23:22:26 UTC

(asterixdb) branch master updated: [NO ISSUE][MISC] Correct the wording of several error messages

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 94a4186dc4 [NO ISSUE][MISC] Correct the wording of several error messages
94a4186dc4 is described below

commit 94a4186dc4b62db30718bc4cdc902dfcd4f9e143
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Tue Oct 6 15:44:55 2026 -0400

    [NO ISSUE][MISC] Correct the wording of several error messages
    
    - user model changes: yes
    - storage format changes: no
    - interface changes: no
    
    Details:
    - 21: read as Java ("integer.MAX_VALUE") and was ungrammatical.
    - 1020: repeated the key kind ("a primary key for primary key").
    - 1021, 1022: a view's foreign key was given an empty key kind, printing
      "The  key field"; name it "foreign".
    - 1064: "An error was occurred".
    - 1233: said "null", but is raised only when the root is set to MISSING.
    
    Ext-ref: MB-74440
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I1a87f7340a499d6b483f8fcf1005f220ff5c0d41
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22004
    Reviewed-by: Michael Blow <mb...@apache.org>
    Reviewed-by: Ian Maxon <im...@apache.org>
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Hussain Towaileb <hu...@gmail.com>
---
 .../java/org/apache/asterix/translator/util/ValidateUtil.java     | 3 ++-
 .../asterix-app/src/test/resources/runtimets/sqlpp_queries.xml    | 4 ++--
 .../asterix-common/src/main/resources/asx_errormsg/en.properties  | 8 ++++----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
index 711bd65d2e..9ff49e36e5 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/ValidateUtil.java
@@ -48,6 +48,7 @@ import org.apache.hyracks.util.LogRedactionUtil;
 public class ValidateUtil {
 
     private static final String PRIMARY = "primary";
+    private static final String FOREIGN = "foreign";
 
     private ValidateUtil() {
     }
@@ -152,7 +153,7 @@ public class ValidateUtil {
             boolean forPrimaryKey, SourceLocation sourceLoc, List<TypeExpression> partitioningExprTypes)
             throws AlgebricksException {
         checkDuplicateFields(partitioningExprs, sourceLoc);
-        String keyKindDisplayName = forPrimaryKey ? PRIMARY : "";
+        String keyKindDisplayName = forPrimaryKey ? PRIMARY : FOREIGN;
         List<IAType> computedPartitioningExprTypes = new ArrayList<>(partitioningExprs.size());
         if (autogenerated) {
             if (partitioningExprs.size() > 1) {
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
index 6c375aa19e..d86e561686 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
@@ -16100,8 +16100,8 @@
         <expected-error>ASX0039: Expected integer value, got 1.75 (in line 28, at column 19)</expected-error>
         <expected-error>ASX1091: Type mismatch: expected value of type integer, but got the value of type string (in line 28, at column 7)</expected-error>
         <expected-error>ASX1091: Type mismatch: expected value of type integer, but got the value of type boolean (in line 28, at column 16)</expected-error>
-        <expected-error>ASX0021: Source value 9999999999 is out of range that integer can hold - integer.MAX_VALUE: 2147483647, integer.MIN_VALUE: -2147483648</expected-error>
-        <expected-error>ASX0021: Source value 8888888888 is out of range that integer can hold - integer.MAX_VALUE: 2147483647, integer.MIN_VALUE: -2147483648</expected-error>
+        <expected-error>ASX0021: Value 9999999999 is out of range for type integer, which holds values from -2147483648 to 2147483647</expected-error>
+        <expected-error>ASX0021: Value 8888888888 is out of range for type integer, which holds values from -2147483648 to 2147483647</expected-error>
         <source-location>false</source-location>
       </compilation-unit>
     </test-case>
diff --git a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
index dd03675e41..29a0b4c54e 100644
--- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
+++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
@@ -57,7 +57,7 @@
 18 = Cannot convert the %1$s type to the %2$s type.
 19 = Cannot convert integer types. The source type should be one of %1$s.
 20 = Cannot convert integer types. The target type should be one of %1$s.
-21 = Source value %1$s is out of range that %2$s can hold - %2$s.MAX_VALUE: %3$s, %2$s.MIN_VALUE: %4$s
+21 = Value %1$s is out of range for type %2$s, which holds values from %4$s to %3$s
 22 = The accessed field is untyped, but should be typed
 23 = %1$ss passed before getting back the responses from NCs
 24 = Invalid coordinate
@@ -135,7 +135,7 @@
 1017 = The filter field '%1$s' cannot be an optional field
 1018 = Field of type %1$s cannot be used as a filter field
 1019 = Cannot autogenerate a composite %1$s key
-1020 = Cannot autogenerate a %1$s key for %1$s key of type %2$s. Autogenerated %1$s keys must be of type %3$s
+1020 = Cannot autogenerate a %1$s key of type %2$s. Autogenerated %1$s keys must be of type %3$s
 1021 = The %1$s key field '%2$s' cannot be nullable
 1022 = Field of type %1$s cannot be used as a %2$s key field
 1023 = Cannot drop dataset %1$s since it is connected to active entity: %2$s
@@ -179,7 +179,7 @@
 1061 = Field '%1$s' in the with clause cannot be null or missing
 1062 = Configuration parameter cannot be of type %1$s
 1063 = Cannot find dataverse with name %1$s
-1064 = An error was occurred while converting type %1$s to type %2$s.
+1064 = An error occurred while converting type %1$s to type %2$s.
 1065 = There should be at least two applicable indexes.
 1066 = Cannot serialize a value.
 1067 = Cannot find a non-missing SELECT operator in GROUP operator for a left-outer-join plan optimization.
@@ -347,7 +347,7 @@
 1230 = Unsupported Iceberg catalog source: '%1$s'
 1231 = Variable '%1$s' is not accessible in this UPDATE operation
 1232 = Cannot update both parent and child fields in the same UPDATE statement
-1233 = UPDATE statement cannot set entire record to null. Use DELETE statement to remove records
+1233 = UPDATE statement cannot set the entire record to MISSING. Use a DELETE statement to remove records
 1234 = Invalid update target, expected a list, but found: %s
 1235 = The provided Iceberg namespace '%1$s' does not exist
 1236 = The provided Iceberg table '%1$s' does not exist