eric-wang-1990 opened a new pull request, #2695: URL: https://github.com/apache/arrow-adbc/pull/2695
# PR Description: Enhance C# GetColumns with BASE_TYPE_NAME Column ## Summary This PR enhances the C# ADBC driver's `GetColumns` functionality by adding a new `BASE_TYPE_NAME` column to the result set. This column provides the base type name without parameters or decorations, making it easier for clients to identify the fundamental data type regardless of its parameterization. ## Proposed Changes - Added a new `BASE_TYPE_NAME` column to the `GetColumns` result schema - Enhanced the `HiveServer2Statement` class to process and populate the `BASE_TYPE_NAME` column - Changed visibility modifiers for several methods from `protected` to `public` or `internal` to enable the enhancement - Added support for the `VARIANT` SQL type in the `SqlTypeNameParser` - Created comprehensive unit tests to verify the functionality with various data types ## Implementation Details The implementation: 1. Intercepts `GetColumns` query results 2. Processes each row to extract the base type name using the existing `SetPrecisionScaleAndTypeName` method 3. Adds the base type name as a new column in the result set 4. Preserves and potentially enhances precision and scale information for parameterized types ## Benefits - Simplifies client code that needs to identify base types (e.g., all DECIMAL types regardless of precision/scale) - Maintains compatibility with existing code as this is an additive change - Improves developer experience by providing clearer type information ## Testing Added comprehensive unit tests that verify: - The presence of the BASE_TYPE_NAME column in GetColumns results - Correct base type extraction for simple types - Correct base type extraction for complex types (DECIMAL, INTERVAL, MAP, ARRAY, STRUCT) - Precision and scale preservation for DECIMAL types - Proper handling of type aliases (INT vs INTEGER) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
