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

asf-gitbox-commits pushed a commit to branch PHOENIX-7998
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit 5a7da6ba6910bc4a1433910f5f70de9544aace8c
Author: Andrew Purtell <[email protected]>
AuthorDate: Wed Oct 7 11:54:20 2026 -0700

    PHOENIX-7998 Declare distance operator token types as lexer fragments
    
    ANTLR warned 'no lexer rule corresponding to token' for DIST_L2,
    DIST_COSINE, and DIST_INNER because they were imaginary tokens set via
    $type in the LT rule. Declare them as fragment lexer rules instead. LT
    still emits them through its syntactic predicates, so '<-1' and '<='
    continue to lex as LT.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---
 phoenix-core-client/src/main/antlr3/PhoenixSQL.g | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/phoenix-core-client/src/main/antlr3/PhoenixSQL.g 
b/phoenix-core-client/src/main/antlr3/PhoenixSQL.g
index 934043e071..7c4ba02c02 100644
--- a/phoenix-core-client/src/main/antlr3/PhoenixSQL.g
+++ b/phoenix-core-client/src/main/antlr3/PhoenixSQL.g
@@ -169,10 +169,6 @@ tokens
     CONSISTENCY = 'consistency';
     EVENTUAL = 'eventual';
     STRONG = 'strong';
-    // Infix vector distance operator tokens (<->, <=>, <#>)
-    DIST_L2;
-    DIST_COSINE;
-    DIST_INNER;
 }
 
 
@@ -1557,6 +1553,11 @@ LT
         )
     ;
 
+// Token types for the infix distance operators; emitted only by LT above
+fragment DIST_L2 : '<->' ;
+fragment DIST_COSINE : '<=>' ;
+fragment DIST_INNER : '<#>' ;
+
 GT
     :   '>'
     ;

Reply via email to