Skip to content

Conversation

@eric-wang-1990
Copy link
Contributor

Arrow-ADBC Catalog Parameter Support

Overview

This branch adds support for properly handling catalog parameters in the C# ADBC driver for Databricks, with special handling for the legacy "SPARK" catalog. The implementation ensures backward compatibility with tools that expect "SPARK" to act as a default catalog alias while also supporting multiple catalog configurations.

Key Changes

  1. Legacy SPARK Catalog Handling: Added special handling for the "SPARK" catalog name, treating it as a null catalog to trigger default catalog behavior in the underlying API.

  2. Multiple Catalog Support: Enhanced the implementation to respect the EnableMultipleCatalogSupport configuration setting, with proper behavior for both enabled and disabled states.

  3. Metadata Query Optimization: Implemented optimized metadata query handling (GetCatalogs, GetSchemas, GetTables, GetColumns) that avoids unnecessary RPC calls when possible.

  4. Protected Method Visibility: Modified method visibility in base classes to allow proper overriding in derived classes, enabling specialized catalog handling.

  5. Comprehensive Testing: Added tests to verify the behavior of metadata queries with different catalog settings and configurations.

Implementation Details

The implementation follows a clean approach that:

  • Properly handles the "SPARK" catalog as a special case
  • Returns synthetic results for certain metadata queries to avoid unnecessary network calls
  • Maintains schema compatibility between real and synthetic results
  • Provides proper encapsulation of the multiple catalog support flag

These changes improve compatibility with various client tools while maintaining performance and adhering to the ADBC specification.

…g support

Adds a new connection parameter 'adbc.databricks.enable_multiple_catalog_support' to control whether the driver should use multiple catalogs or restrict to a default catalog. Default is true for backward compatibility. This parameter accepts boolean values 'true'/'false' or '1'/'0' for compatibility with tools like PowerBI.
@github-actions github-actions bot modified the milestone: ADBC Libraries 19 May 27, 2025
@eric-wang-1990 eric-wang-1990 changed the title Add catalog parameter support feat(csharp/src/Drivers/Databricks): Handle legacy SPARK catalog May 27, 2025
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Either I'm missing something or the logic in the Databricks-specific implementations is backwards.

@CurtHagenlocher CurtHagenlocher merged commit 8ef75b1 into apache:main May 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants