Skip to content

Commit ebdfbfa

Browse files
committed
Fixed call to DeleteRelation.
1 parent 48793a1 commit ebdfbfa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/from_substrait.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,11 +904,11 @@ shared_ptr<Relation> SubstraitToDuckDB::TransformWriteOp(const substrait::Rel &s
904904
case RelationType::PROJECTION_RELATION: {
905905
auto project = std::move(input.get()->Cast<ProjectionRelation>());
906906
auto filter = std::move(project.child->Cast<FilterRelation>());
907-
return make_shared_ptr<DeleteRelation>(filter.context, std::move(filter.condition), schema_name, table_name);
907+
return make_shared_ptr<DeleteRelation>(filter.context, std::move(filter.condition), catalog_name, schema_name, table_name);
908908
}
909909
case RelationType::FILTER_RELATION: {
910910
auto filter = std::move(input.get()->Cast<FilterRelation>());
911-
return make_shared_ptr<DeleteRelation>(filter.context, std::move(filter.condition), schema_name, table_name);
911+
return make_shared_ptr<DeleteRelation>(filter.context, std::move(filter.condition), catalog_name, schema_name, table_name);
912912
}
913913
default:
914914
throw NotImplementedException("Unsupported relation type for delete operation");

test/c/test_substrait_c_api.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ TEST_CASE_METHOD(DataDirectoryFixture, "Test C Function Varchar Literal", "[subs
291291
DuckDB db(nullptr);
292292
Connection con(db);
293293

294-
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg;"));
294+
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg FROM core_nightly;"));
295295
REQUIRE_NO_FAIL(con.Query("LOAD iceberg;"));
296296

297297
const string plan_json = R"plan(
@@ -397,7 +397,7 @@ TEST_CASE_METHOD(DataDirectoryFixture, "Test C Iceberg Substrait with Substrait
397397
DuckDB db(nullptr);
398398
Connection con(db);
399399

400-
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg;"));
400+
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg FROM core_nightly;"));
401401
REQUIRE_NO_FAIL(con.Query("LOAD iceberg;"));
402402

403403
const string plan_json = R"plan(
@@ -476,7 +476,7 @@ TEST_CASE_METHOD(DataDirectoryFixture, "Test C Iceberg Substrait Snapshot ID wit
476476
DuckDB db(nullptr);
477477
Connection con(db);
478478

479-
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg;"));
479+
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg FROM core_nightly;"));
480480
REQUIRE_NO_FAIL(con.Query("LOAD iceberg;"));
481481

482482
const string plan_json = R"plan(
@@ -556,7 +556,7 @@ TEST_CASE_METHOD(DataDirectoryFixture, "Test C Iceberg Substrait Snapshot Timest
556556
DuckDB db(nullptr);
557557
Connection con(db);
558558

559-
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg;"));
559+
REQUIRE_NO_FAIL(con.Query("INSTALL iceberg FROM core_nightly;"));
560560
REQUIRE_NO_FAIL(con.Query("LOAD iceberg;"));
561561

562562
const string plan_json = R"plan(
@@ -667,4 +667,4 @@ TEST_CASE("Test C Project with VirtualTable", "[substrait-api]") {
667667
auto json_plan = R"({"version":{"minorNumber":29, "producer":"substrait-go darwin/arm64"}, "relations":[{"root":{"input":{"project":{"common":{"emit":{"outputMapping":[2]}}, "input":{"read":{"common":{"direct":{}}, "baseSchema":{"names":["c1", "c2"], "struct":{"types":[{"fp64":{"nullability":"NULLABILITY_NULLABLE"}}, {"fp64":{"nullability":"NULLABILITY_NULLABLE"}}], "nullability":"NULLABILITY_REQUIRED"}}, "virtualTable":{"expressions":[{"fields":[{"literal":{"fp64":1, "nullable":true}}, {"literal":{"fp64":2, "nullable":true}}]}]}}}, "expressions":[{"literal":{"fp64":42}}]}}, "names":["p1"]}}]})";
668668
auto result = FromSubstraitJSON(con,json_plan);
669669
REQUIRE(CHECK_COLUMN(result, 0, {42}));
670-
}
670+
}

0 commit comments

Comments
 (0)