From c8d1ce81adf7b3e4b0036effb43563e87a685b30 Mon Sep 17 00:00:00 2001
From: David Li
Date: Thu, 5 Mar 2026 17:02:51 +0900
Subject: [PATCH 1/2] feat(format): add table_definition to GetObjects
Closes #3984.
---
c/include/arrow-adbc/adbc.h | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/c/include/arrow-adbc/adbc.h b/c/include/arrow-adbc/adbc.h
index a461795ce0..4aeec22f52 100644
--- a/c/include/arrow-adbc/adbc.h
+++ b/c/include/arrow-adbc/adbc.h
@@ -1991,12 +1991,16 @@ AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection* connection,
///
/// TABLE_SCHEMA is a Struct with fields:
///
-/// | Field Name | Field Type |
-/// |--------------------------|-------------------------|
-/// | table_name | utf8 not null |
-/// | table_type | utf8 not null |
-/// | table_columns | list |
-/// | table_constraints | list |
+/// | Field Name | Field Type | Comments |
+/// |--------------------------|-------------------------|----------|
+/// | table_name | utf8 not null | |
+/// | table_type | utf8 not null | |
+/// | table_columns | list | |
+/// | table_constraints | list | |
+/// | table_definition | utf8 | (1) |
+///
+/// 1. [Since version 1.2.0] The table or view definition (e.g. a SQL DDL
+/// statement). This field is optional.
///
/// COLUMN_SCHEMA is a Struct with fields:
///
From 81d6d1e11b4f475389a50887964f7edf233835f3 Mon Sep 17 00:00:00 2001
From: David Li
Date: Mon, 9 Mar 2026 15:53:02 +0900
Subject: [PATCH 2/2] add more
---
c/include/arrow-adbc/adbc.h | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/c/include/arrow-adbc/adbc.h b/c/include/arrow-adbc/adbc.h
index 4aeec22f52..3d098b41fe 100644
--- a/c/include/arrow-adbc/adbc.h
+++ b/c/include/arrow-adbc/adbc.h
@@ -1977,17 +1977,25 @@ AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection* connection,
///
/// The result is an Arrow dataset with the following schema:
///
-/// | Field Name | Field Type |
-/// |--------------------------|-------------------------|
-/// | catalog_name | utf8 |
-/// | catalog_db_schemas | list |
+/// | Field Name | Field Type | Comments |
+/// |--------------------------|-------------------------|----------|
+/// | catalog_name | utf8 | |
+/// | catalog_db_schemas | list | |
+/// | remarks | utf8 | (1) |
+///
+/// 1. [Since version 1.2.0] A description of the catalog. This field is
+/// optional.
///
/// DB_SCHEMA_SCHEMA is a Struct with fields:
///
-/// | Field Name | Field Type |
-/// |--------------------------|-------------------------|
-/// | db_schema_name | utf8 |
-/// | db_schema_tables | list |
+/// | Field Name | Field Type | Comments |
+/// |--------------------------|-------------------------|----------|
+/// | db_schema_name | utf8 | |
+/// | db_schema_tables | list | |
+/// | remarks | utf8 | (1) |
+///
+/// 1. [Since version 1.2.0] A description of the schema. This field is
+/// optional.
///
/// TABLE_SCHEMA is a Struct with fields:
///
@@ -1998,9 +2006,12 @@ AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection* connection,
/// | table_columns | list | |
/// | table_constraints | list | |
/// | table_definition | utf8 | (1) |
+/// | remarks | utf8 | (2) |
///
/// 1. [Since version 1.2.0] The table or view definition (e.g. a SQL DDL
/// statement). This field is optional.
+/// 2. [Since version 1.2.0] A description of the table. This field is
+/// optional.
///
/// COLUMN_SCHEMA is a Struct with fields:
///
@@ -2025,12 +2036,14 @@ AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection* connection,
/// | xdbc_scope_table | utf8 | (3) |
/// | xdbc_is_autoincrement | bool | (3) |
/// | xdbc_is_generatedcolumn | bool | (3) |
+/// | xdbc_source_data_type | int16 | (3, 4) |
///
/// 1. The column's ordinal position in the table (starting from 1).
/// 2. Database-specific description of the column.
/// 3. Optional value. Should be null if not supported by the driver.
/// xdbc_ values are meant to provide JDBC/ODBC-compatible metadata
/// in an agnostic manner.
+/// 4. [Since version 1.2.0] This field is optional.
///
/// CONSTRAINT_SCHEMA is a Struct with fields:
///
@@ -2093,6 +2106,13 @@ AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection* connection,
/// values may still be null if the driver does not actually support that
/// field).
///
+/// Starting in version 1.2.0, driver-specific fields were introduced to the
+/// schema. Drivers may add custom fields at the end of any schema above to
+/// reflect vendor-specific metadata. Applications must access these using an
+/// offset from the end of the schema and cannot assume that the index of the
+/// field will remain stable. Drivers should prefix field names with the
+/// vendor/driver name to differentiate them (e.g. 'POSTGRESQL:owner').
+///
/// This AdbcConnection must outlive the returned ArrowArrayStream.
///
/// \param[in] connection The database connection.