Skip to content

Commit 989dbe0

Browse files
authored
feat(format): formalize vendor type name metadata (#4550)
Closes #3449.
1 parent 120a65c commit 989dbe0

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

  • c/include/arrow-adbc
  • go/adbc/drivermgr/arrow-adbc

c/include/arrow-adbc/adbc.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,10 @@ AdbcStatusCode AdbcMultiResultSetRelease(struct AdbcMultiResultSet* result_set,
12681268
/// has been reached; it should simply continue to return ADBC_STATUS_OK with a
12691269
/// NULL release callback.
12701270
///
1271+
/// Drivers may annotate the result schema columns with the underlying
1272+
/// system's name for the data type by adding field metadata. See
1273+
/// AdbcConnectionGetTableSchema.
1274+
///
12711275
/// \param[in] result_set The result set struct to fetch the next result from.
12721276
/// \param[out] out The result stream to populate
12731277
/// \param[out] rows_affected The number of rows affected if known, else -
@@ -1297,6 +1301,10 @@ AdbcStatusCode AdbcMultiResultSetNext(struct AdbcMultiResultSet* result_set,
12971301
/// result set has been reached; it should simply continue to return ADBC_STATUS_OK with
12981302
/// a NULL release callback.
12991303
///
1304+
/// Drivers may annotate the result schema columns with the underlying
1305+
/// system's name for the data type by adding field metadata. See
1306+
/// AdbcConnectionGetTableSchema.
1307+
///
13001308
/// \param[in] result_set The result set struct to fetch the next result from.
13011309
/// \param[out] schema The schema of the result set to populate
13021310
/// \param[out] partitions The partitions to populate
@@ -2333,6 +2341,10 @@ AdbcStatusCode AdbcConnectionGetStatisticNames(struct AdbcConnection* connection
23332341

23342342
/// \brief Get the Arrow schema of a table.
23352343
///
2344+
/// Drivers may annotate the result schema columns with the underlying
2345+
/// system's name for the data type by adding field metadata. The name of the
2346+
/// metadata key should be `<VENDOR>:type` (e.g. `POSTGRESQL:type`).
2347+
///
23362348
/// \param[in] connection The database connection.
23372349
/// \param[in] catalog The catalog (or nullptr if not applicable).
23382350
/// \param[in] db_schema The database schema (or nullptr if not applicable).
@@ -2461,6 +2473,10 @@ AdbcStatusCode AdbcStatementRelease(struct AdbcStatement* statement,
24612473
/// Since ADBC 1.1.0: releasing the returned ArrowArrayStream without
24622474
/// consuming it fully is equivalent to calling AdbcStatementCancel.
24632475
///
2476+
/// Drivers may annotate the result schema columns with the underlying
2477+
/// system's name for the data type by adding field metadata. See
2478+
/// AdbcConnectionGetTableSchema.
2479+
///
24642480
/// \param[in] statement The statement to execute.
24652481
/// \param[out] out The results. Pass NULL if the client does not
24662482
/// expect a result set.
@@ -2493,6 +2509,10 @@ AdbcStatusCode AdbcStatementExecuteQuery(struct AdbcStatement* statement,
24932509
/// of all result sets before consuming any data, which can be useful for certain
24942510
/// applications such as query planning or UI display of results.
24952511
///
2512+
/// Drivers may annotate the result schema columns with the underlying
2513+
/// system's name for the data type by adding field metadata. See
2514+
/// AdbcConnectionGetTableSchema.
2515+
///
24962516
/// \param[in] statement The statement to execute.
24972517
/// \param[out] results The result set struct to populate with the schemas of the result
24982518
/// sets.
@@ -2547,6 +2567,10 @@ AdbcStatusCode AdbcStatementExecuteMulti(struct AdbcStatement* statement,
25472567
/// Depending on the driver, this may require first executing
25482568
/// AdbcStatementPrepare.
25492569
///
2570+
/// Drivers may annotate the result schema columns with the underlying
2571+
/// system's name for the data type by adding field metadata. See
2572+
/// AdbcConnectionGetTableSchema.
2573+
///
25502574
/// \since ADBC API revision 1.1.0
25512575
///
25522576
/// \param[in] statement The statement to execute.
@@ -2907,6 +2931,10 @@ AdbcStatusCode AdbcStatementSetOptionDouble(struct AdbcStatement* statement,
29072931
/// \brief Execute a statement and get the results as a partitioned
29082932
/// result set.
29092933
///
2934+
/// Drivers may annotate the result schema columns with the underlying
2935+
/// system's name for the data type by adding field metadata. See
2936+
/// AdbcConnectionGetTableSchema.
2937+
///
29102938
/// \param[in] statement The statement to execute.
29112939
/// \param[out] schema The schema of the result set.
29122940
/// \param[out] partitions The result partitions.

go/adbc/drivermgr/arrow-adbc/adbc.h

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)