diff --git a/extension/iceberg/src/connector/iceberg_connector.cpp b/extension/iceberg/src/connector/iceberg_connector.cpp index 28adce8b633..e41d5f4fc19 100644 --- a/extension/iceberg/src/connector/iceberg_connector.cpp +++ b/extension/iceberg/src/connector/iceberg_connector.cpp @@ -6,7 +6,7 @@ namespace kuzu { namespace iceberg_extension { void IcebergConnector::connect(const std::string& /*dbPath*/, const std::string& /*catalogName*/, - main::ClientContext* context) { + const std::string& /*schemaName*/, main::ClientContext* context) { // Creates an in-memory duckdb instance, then install httpfs and attach postgres. instance = std::make_unique(nullptr); connection = std::make_unique(*instance); diff --git a/extension/iceberg/src/function/iceberg_bindfunc.cpp b/extension/iceberg/src/function/iceberg_bindfunc.cpp index 83bde98ea60..28c1667236e 100644 --- a/extension/iceberg/src/function/iceberg_bindfunc.cpp +++ b/extension/iceberg/src/function/iceberg_bindfunc.cpp @@ -39,7 +39,8 @@ static std::string generateQueryOptions(const TableFuncBindInput* input, std::unique_ptr bindFuncHelper(main::ClientContext* context, TableFuncBindInput* input, const std::string& functionName) { auto connector = std::make_shared(); - connector->connect("" /* inMemDB */, "" /* defaultCatalogName */, context); + connector->connect("" /* inMemDB */, "" /* defaultCatalogName */, "" /* defaultSchemaName */, + context); std::string query_options = generateQueryOptions(input, functionName); std::string query = common::stringFormat("SELECT * FROM {}('{}'{})", functionName, diff --git a/extension/iceberg/src/include/connector/iceberg_connector.h b/extension/iceberg/src/include/connector/iceberg_connector.h index b3fe960cec3..6641400a6c1 100644 --- a/extension/iceberg/src/include/connector/iceberg_connector.h +++ b/extension/iceberg/src/include/connector/iceberg_connector.h @@ -8,7 +8,7 @@ namespace iceberg_extension { class IcebergConnector : public duckdb_extension::DuckDBConnector { public: void connect(const std::string& dbPath, const std::string& catalogName, - main::ClientContext* context) override; + const std::string& schemaName, main::ClientContext* context) override; }; } // namespace iceberg_extension diff --git a/src/function/list/list_contains_function.cpp b/src/function/list/list_contains_function.cpp index fa6de20a6e1..fb535f585c8 100644 --- a/src/function/list/list_contains_function.cpp +++ b/src/function/list/list_contains_function.cpp @@ -23,7 +23,7 @@ struct ListContains { static std::unique_ptr bindFunc(ScalarBindFuncInput input) { auto scalarFunction = input.definition->ptrCast(); - TypeUtils::visit(input.arguments[1]->getDataType().getPhysicalType(), + TypeUtils::visit(ListType::getChildType(input.arguments[0]->getDataType()).getPhysicalType(), [&scalarFunction](T) { scalarFunction->execFunc = ScalarFunction::BinaryExecListStructFunction; diff --git a/test/test_files/function/list.test b/test/test_files/function/list.test index 7b7c674310c..2a1f63a0b39 100644 --- a/test/test_files/function/list.test +++ b/test/test_files/function/list.test @@ -1056,6 +1056,31 @@ True False True +-LOG ListContainsUnmatchType +-STATEMENT MATCH (a:person) where list_contains(cast([0, 7] as int8[]), a.ID) return a.ID +---- 2 +0 +7 + +-STATEMENT MATCH (a:person) where list_contains(cast([2, 3] as int16[]), a.ID) return a.ID +---- 2 +2 +3 + +-STATEMENT MATCH (a:person) where list_contains(cast([5] as int32[]), a.ID) return a.ID +---- 1 +5 + +-STATEMENT MATCH (a:person) where list_contains(cast([7, 8] as int128[]), a.ID) return a.ID +---- 2 +7 +8 + +-STATEMENT MATCH (a:person) where list_contains(cast(['A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11', 'a0eebc99-9c0b4ef8-bb6d6bb9-bd380a15'] as uuid[]), a.u) return a.ID +---- 2 +0 +7 + -LOG ListContainsSelect -STATEMENT MATCH (a:person) WHERE list_contains(a.courseScoresPerTerm, [8]) RETURN a.ID ---- 2 @@ -2310,4 +2335,3 @@ True -STATEMENT RETURN list_has_all(null, null) ---- 1 -