File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -449,7 +449,6 @@ func (con *converter) visitCallFunc(expr *exprpb.Expr) error {
449449 case argType .GetPrimitive () == exprpb .Type_BYTES :
450450 sqlFun = "LENGTH"
451451 case isListType (argType ):
452- sqlFun = "ARRAY_LENGTH"
453452 // For PostgreSQL, we need to specify the array dimension (1 for 1D arrays)
454453 con .str .WriteString ("ARRAY_LENGTH(" )
455454 if target != nil {
@@ -870,7 +869,7 @@ func isFieldAccessExpression(expr *exprpb.Expr) bool {
870869 return false
871870}
872871
873- func (con * converter ) callTimestampFromString (target * exprpb.Expr , args []* exprpb.Expr ) error {
872+ func (con * converter ) callTimestampFromString (_ * exprpb.Expr , args []* exprpb.Expr ) error {
874873 if len (args ) == 1 {
875874 // For PostgreSQL, we need to cast the string to a timestamp
876875 con .str .WriteString ("CAST(" )
Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ func TestCELToSQL_ComprehensiveIntegration(t *testing.T) {
375375 t .Logf ("Complex date CEL: %s" , celExpression )
376376 t .Logf ("Complex date SQL: %s" , sqlCondition )
377377
378- query := fmt . Sprintf ( "SELECT COUNT(*) FROM users WHERE %s" , sqlCondition )
378+ query := "SELECT COUNT(*) FROM users WHERE " + sqlCondition
379379 var count int
380380 err = pool .QueryRow (ctx , query ).Scan (& count )
381381 require .NoError (t , err )
@@ -399,7 +399,7 @@ func TestCELToSQL_ComprehensiveIntegration(t *testing.T) {
399399 t .Logf ("Complex array CEL: %s" , celExpression )
400400 t .Logf ("Complex array SQL: %s" , sqlCondition )
401401
402- query := fmt . Sprintf ( "SELECT COUNT(*) FROM products WHERE %s" , sqlCondition )
402+ query := "SELECT COUNT(*) FROM products WHERE " + sqlCondition
403403 var count int
404404 err = pool .QueryRow (ctx , query ).Scan (& count )
405405 require .NoError (t , err )
You can’t perform that action at this time.
0 commit comments