From 7eb8b45b03ad552deb66c735135e4d1993e6fe0a Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Fri, 14 Jun 2024 15:41:32 -0700 Subject: [PATCH 1/2] right hand side is value --- src/delta_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/delta_utils.cpp b/src/delta_utils.cpp index b02e898..729daa3 100644 --- a/src/delta_utils.cpp +++ b/src/delta_utils.cpp @@ -262,7 +262,7 @@ uintptr_t PredicateVisitor::VisitConstantFilter(const string &col_name, const Co case LogicalType::VARCHAR: { // WARNING: C++ lifetime extension rules don't protect calls of the form foo(std::string(...).c_str()) auto str = StringValue::Get(value); - auto maybe_right = ffi::visit_expression_literal_string(state, KernelUtils::ToDeltaString(col_name), DuckDBEngineError::AllocateError); + auto maybe_right = ffi::visit_expression_literal_string(state, KernelUtils::ToDeltaString(value), DuckDBEngineError::AllocateError); right = KernelUtils::UnpackResult(maybe_right, "VisitConstantFilter failed to visit_expression_literal_string"); break; } From 09ed2049cdd7fa9edf6d22bd5cebe5a58d096b70 Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Mon, 17 Jun 2024 11:42:35 -0700 Subject: [PATCH 2/2] pass str, not value --- src/delta_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/delta_utils.cpp b/src/delta_utils.cpp index 729daa3..3be9bba 100644 --- a/src/delta_utils.cpp +++ b/src/delta_utils.cpp @@ -262,7 +262,7 @@ uintptr_t PredicateVisitor::VisitConstantFilter(const string &col_name, const Co case LogicalType::VARCHAR: { // WARNING: C++ lifetime extension rules don't protect calls of the form foo(std::string(...).c_str()) auto str = StringValue::Get(value); - auto maybe_right = ffi::visit_expression_literal_string(state, KernelUtils::ToDeltaString(value), DuckDBEngineError::AllocateError); + auto maybe_right = ffi::visit_expression_literal_string(state, KernelUtils::ToDeltaString(str), DuckDBEngineError::AllocateError); right = KernelUtils::UnpackResult(maybe_right, "VisitConstantFilter failed to visit_expression_literal_string"); break; }