Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Override of useNullableQuerySchema Method in ClickHouseTable Class #382

Open
jonasasx opened this issue Jan 27, 2025 · 0 comments

Comments

@jonasasx
Copy link

jonasasx commented Jan 27, 2025

The useNullableQuerySchema method has been added in the com.clickhouse.spark.ClickHouseTable class. However, the correct place for this override is in the com.clickhouse.spark.ClickHouseCatalog class because the org.apache.spark.sql.connector.catalog.TableCatalog interface already includes this method with the following default implementation:

default boolean useNullableQuerySchema() {
    return true;
}

Overriding the method in ClickHouseCatalog will ensure proper functionality when interacting with the catalog and avoid potential inconsistencies with the TableCatalog interface implementation.

Steps to Fix:

  1. Move the useNullableQuerySchema method override from ClickHouseTable to ClickHouseCatalog.
  2. Ensure the method implementation meets the requirements and returns appropriate values based on the context.
  3. Update existing tests or add new ones to validate the method’s functionality in the ClickHouseCatalog class.

Expected Outcome: The useNullableQuerySchema method is correctly implemented in the ClickHouseCatalog class, aligning with the TableCatalog interface standards and providing the expected functionality.

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

No branches or pull requests

1 participant