You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by al...@apache.org on 2026/09/15 22:31:27 UTC

(asterixdb) branch master updated: [NO ISSUE][COMP] Require the vector index epsilon to be positive, uncapped

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 14d7309188 [NO ISSUE][COMP] Require the vector index epsilon to be positive, uncapped
14d7309188 is described below

commit 14d730918866595f175adbc087575a4728b18918
Author: Le0shy <le...@gmail.com>
AuthorDate: Tue Sep 8 16:12:18 2026 -0700

    [NO ISSUE][COMP] Require the vector index epsilon to be positive, uncapped
    
    Ext-ref: MB-73926
    
    Change-Id: I88d1e0b93077dd36b18be13f6e883fe56dfbbc5b
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21721
    Tested-by: Ali Alsuliman <al...@gmail.com>
    Reviewed-by: Ali Alsuliman <al...@gmail.com>
    Reviewed-by: Hongyu Shi <le...@gmail.com>
---
 .../org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java
index 3fbab85676..41efb39f94 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java
@@ -211,11 +211,11 @@ public class VectorIndexDeclUtil {
         if (epsNode == null) {
             return VectorIndexParameters.DEFAULT_EPSILON;
         }
-        double value =
-                parseDoubleOrBigInt(epsNode, "Invalid `epsilon` parameter value. It must be in the range of [0,1]");
-        if (value < 0 || value > 1) {
+        double value = parseDoubleOrBigInt(epsNode,
+                "Invalid `epsilon` parameter value. It must be a finite number greater than 0");
+        if (!Double.isFinite(value) || value <= 0) {
             throw new CompilationException(ErrorCode.COMPILATION_VECTOR_INDEX_CREATION_FAILED,
-                    "Invalid `epsilon` parameter value. It must be in the range of [0,1]");
+                    "Invalid `epsilon` parameter value. It must be a finite number greater than 0");
         }
         return value;
     }