You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "marcuslin123 (via GitHub)" <gi...@apache.org> on 2026/07/11 03:36:24 UTC

[PR] [SPARK-58036][SQL] Delegate missing methods in AggregatedDialect to underlying dialects [spark]

marcuslin123 opened a new pull request, #57193:
URL: https://github.com/apache/spark/pull/57193

   ### What changes were proposed in this pull request?
   
   Add missing method overrides in `AggregatedDialect` that delegate to the underlying dialects, fixing cases where the generic `JdbcDialect` default is used instead of the database-specific implementation.
   
   Methods now properly delegated:
   - `compileValue` — the reported bug (Oracle timestamps formatted incorrectly)
   - `compileExpression` — SQL expression pushdown
   - `isSupportedFunction` — function pushdown support (returns true if any dialect supports it)
   - `getJdbcSQLQueryBuilder` — SQL query builder
   - `supportsLimit` / `supportsOffset` / `supportsHint` / `supportsJoin` — query capability flags
   - `getLimitClause` / `getOffsetClause` — SQL clause generation
   - `classifyException` — error classification
   - `renameTable` — DDL generation
   - `functions` — custom SQL functions
   - `createConnectionFactory` — connection creation
   
   ### Why are the changes needed?
   
   When a user registers a custom JDBC dialect alongside a built-in one (e.g., Oracle), Spark combines them into an `AggregatedDialect`. However, `AggregatedDialect` only delegated ~11 methods to the underlying dialects — the rest fell through to the generic `JdbcDialect` defaults. This caused database-specific behavior (like Oracle's timestamp literal formatting) to be silently dropped, producing invalid SQL.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Users with custom JDBC dialects registered alongside built-in dialects will now get correct database-specific SQL generation for all delegated methods, instead of generic defaults that may produce invalid SQL.
   
   ### How was this patch tested?
   
   Added a new test "Aggregated dialects: delegation of compileValue and other methods" in `JDBCSuite.scala` that verifies `compileValue`, `isSupportedFunction`, `supportsLimit`, `supportsOffset`, `getLimitClause`, and `getOffsetClause` are properly delegated through the aggregated dialect.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generative AI tooling (Claude Code) was used as an assistive tool for implementation guidance.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58036][SQL] Delegate missing methods in AggregatedDialect to underlying dialects [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #57193: [SPARK-58036][SQL] Delegate missing methods in AggregatedDialect to underlying dialects
URL: https://github.com/apache/spark/pull/57193


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-58036][SQL] Delegate missing methods in AggregatedDialect to underlying dialects [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57193:
URL: https://github.com/apache/spark/pull/57193#issuecomment-6280675820

   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org