From ccec0d5ede7a57e947b30646d37c1aa152efa97d Mon Sep 17 00:00:00 2001 From: esevastyanov Date: Tue, 19 Dec 2023 15:33:42 +0300 Subject: [PATCH] Druid lower argument fix (#3723) Co-authored-by: Egor Ryashin (cherry picked from commit e19116ca79dd45a64a66c236e3bea5f37a8d89d7) --- runtime/queries/metricsview.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/queries/metricsview.go b/runtime/queries/metricsview.go index 421e3ec4363..70058a72a71 100644 --- a/runtime/queries/metricsview.go +++ b/runtime/queries/metricsview.go @@ -250,7 +250,7 @@ func buildFilterClauseForCondition(mv *runtimev1.MetricsViewSpec, cond *runtimev } else { if dialect == drivers.DialectDruid { // Druid does not support ILIKE - clause = fmt.Sprintf("LOWER(%s) %s LIKE LOWER(?)", name, notKeyword) + clause = fmt.Sprintf("LOWER(%s) %s LIKE LOWER(CAST(? AS VARCHAR))", name, notKeyword) } else { clause = fmt.Sprintf("%s %s ILIKE ?", name, notKeyword) }