Commit 9be1721
feat(csharp): implement SEA metadata operations
Implement metadata operations for the Statement Execution API (REST)
protocol, achieving parity with the existing Thrift implementation.
## Core Implementation
- IGetObjectsDataProvider async implementation for SEA in
StatementExecutionConnection (GetCatalogs, GetSchemas, GetTables,
GetColumns via SHOW commands)
- Statement-level metadata routing in StatementExecutionStatement
(GetColumns, GetColumnsExtended, GetPrimaryKeys, GetCrossReference,
GetTableSchema, GetTableTypes, GetInfo)
- SQL command builders (ShowCatalogs/Schemas/Tables/Columns/Keys/
ForeignKeys) with pattern conversion (ADBC % → Databricks *)
- ColumnMetadataHelper for computing column metadata from type name
strings (SEA-only, Thrift gets these from server)
- FlatColumnsResultBuilder for building flat GetColumns results
- MetadataUtilities for shared catalog/pattern helpers
## Connection Parameters
- EnablePKFK: gate PK/FK queries (default: true)
- EnableMultipleCatalogSupport: single vs multi-catalog mode
(default: true), matching Thrift DatabricksConnection behavior
- DatabricksStatement-specific options silently accepted in SEA
## Design
- Shared MetadataSchemaFactory (hiveserver2) for Arrow schemas
- Shared GetObjectsResultBuilder for nested GetObjects structure
- Async internally, blocks once at ADBC sync boundary
- x-databricks-sea-can-run-fully-sync header for metadata queries
- Design doc: csharp/doc/sea-metadata-design.md
## Testing
- Unit tests for ShowCommands and MetadataUtilities (146 tests)
- E2E tests comparing Thrift and SEA parity (17 tests)
- Metadata comparator tool with schema type comparison
## Reviewed in
- hiveserver2: #21, #22 (merged)
- databricks: #257, #258, #259, #260, #261, #282 (reviewed)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4115e5f commit 9be1721
File tree
25 files changed
+3725
-357
lines changed- csharp
- doc
- src
- Result
- StatementExecution
- MetadataCommands
- test
- E2E
- StatementExecution
- Unit
- StatementExecution
- tools/MetadataComparator
25 files changed
+3725
-357
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
Submodule hiveserver2 updated 7 files
- csharp/src/Hive2/GetObjectsResultBuilder.cs+286
- csharp/src/Hive2/HiveInfoArrowStream.cs+51
- csharp/src/Hive2/HiveServer2Connection.cs+176-541
- csharp/src/Hive2/HiveServer2Statement.cs+29-60
- csharp/src/Hive2/IGetObjectsDataProvider.cs+53
- csharp/src/Hive2/MetadataSchemaDefinitions.cs+409
- csharp/src/Hive2/TableInfo.cs+47
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| |||
0 commit comments