From 3466b750eead85258c6b27bc0b1206389afc3b04 Mon Sep 17 00:00:00 2001 From: Rusty Conover Date: Fri, 11 Sep 2026 17:34:54 +0000 Subject: [PATCH] Adopt VGI 2 write result modes --- include/vgi/generated/vgi_protocol_schemas.hpp | 8 +++----- src/catalog.cpp | 5 +---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/vgi/generated/vgi_protocol_schemas.hpp b/include/vgi/generated/vgi_protocol_schemas.hpp index d278b88..015d21f 100644 --- a/include/vgi/generated/vgi_protocol_schemas.hpp +++ b/include/vgi/generated/vgi_protocol_schemas.hpp @@ -2,7 +2,7 @@ // GENERATED by vgi.codegen.cpp_schemas. DO NOT EDIT BY HAND. // // Generator: vgi-gen-cpp-schemas v1 -// Content hash: 34dcd3763f1b +// Content hash: f504e84ec5d8 // // To regenerate: // scripts/regenerate_protocol.sh @@ -54,10 +54,7 @@ inline const std::shared_ptr &TableInfoSchema() { arrow::field("check_constraints", arrow::list(arrow::utf8()), /*nullable=*/false), arrow::field("primary_key_constraints", arrow::list(arrow::list(arrow::int32())), /*nullable=*/false), arrow::field("foreign_key_constraints", arrow::list(arrow::binary()), /*nullable=*/false), - arrow::field("supports_insert", arrow::boolean(), /*nullable=*/false), - arrow::field("supports_update", arrow::boolean(), /*nullable=*/false), - arrow::field("supports_delete", arrow::boolean(), /*nullable=*/false), - arrow::field("supports_returning", arrow::boolean(), /*nullable=*/false), + arrow::field("write_result_modes", arrow::map(arrow::utf8(), arrow::utf8()), /*nullable=*/false), arrow::field("supports_column_statistics", arrow::boolean(), /*nullable=*/false), arrow::field("scan_function", arrow::binary(), /*nullable=*/true), arrow::field("insert_function", arrow::binary(), /*nullable=*/true), @@ -98,6 +95,7 @@ inline const std::shared_ptr &FunctionInfoSchema() { arrow::field("parameter_default_values", arrow::binary(), /*nullable=*/true), arrow::field("stability", arrow::dictionary(arrow::int16(), arrow::utf8()), /*nullable=*/true), arrow::field("null_handling", arrow::dictionary(arrow::int16(), arrow::utf8()), /*nullable=*/true), + arrow::field("argument_monotonicity", arrow::list(arrow::utf8()), /*nullable=*/true), arrow::field("description", arrow::utf8(), /*nullable=*/false), arrow::field("examples", arrow::list(arrow::struct_({arrow::field("sql", arrow::utf8(), /*nullable=*/false), arrow::field("description", arrow::utf8(), /*nullable=*/false), arrow::field("expected_output", arrow::utf8(), /*nullable=*/true)})), /*nullable=*/false), arrow::field("categories", arrow::list(arrow::utf8()), /*nullable=*/false), diff --git a/src/catalog.cpp b/src/catalog.cpp index 1329030..bb8a8f3 100644 --- a/src/catalog.cpp +++ b/src/catalog.cpp @@ -820,10 +820,7 @@ std::string Dispatcher::encode_table_info(const CatalogTable& table, const Schem .set_string_list("schema_path", schema_path) .set_binary("columns", wire::encode_schema(shape)) .set_binary("scan_function", table.inline_scan ? wire::encode_ipc(scan) : std::string{}) - .set_bool("supports_insert", false) - .set_bool("supports_update", false) - .set_bool("supports_delete", false) - .set_bool("supports_returning", false) + .set_string_map("write_result_modes", {}) .set_int32_list("not_null_constraints", reseat(table.not_null, table.columns, shape)) .set_int32_list_list("unique_constraints", reseat(table.unique, table.columns, shape)) .set_int32_list_list("primary_key_constraints",