Skip to content

branch-4.0: [fix](jdbc) Fix PG array null detection and SQL Server date format pushdown #60954#60972

Merged
yiguolei merged 1 commit intobranch-4.0from
auto-pick-60954-branch-4.0
Mar 3, 2026
Merged

branch-4.0: [fix](jdbc) Fix PG array null detection and SQL Server date format pushdown #60954#60972
yiguolei merged 1 commit intobranch-4.0from
auto-pick-60954-branch-4.0

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 3, 2026

Cherry-picked from #60954

…shdown (#60954)

### What problem does this PR solve?

Fix two issues in JDBC catalog:

1. PostgreSQL array type detection: When the first row of a PostgreSQL
   table has NULL in an array column, `array_ndims(col)` returns NULL,
   causing arrayDimensions to remain 0 and the column type to be
   mapped as UNSUPPORTED. Add `WHERE col IS NOT NULL` to the detection
   query so that it finds a non-NULL row to correctly determine array
   dimensions.

2. SQL Server date/datetime predicate pushdown: Date and datetime
   literals were pushed down to SQL Server as plain string literals.
   Depending on SQL Server's language setting, this can cause conversion
errors. Use CONVERT(DATE, '...', 23) and CONVERT(DATETIME, '...', 121)
   for language-independent date format handling.
@github-actions github-actions bot requested a review from yiguolei as a code owner March 3, 2026 04:50
@Thearas
Copy link
Contributor

Thearas commented Mar 3, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring closed this Mar 3, 2026
@dataroaring dataroaring reopened this Mar 3, 2026
@Thearas
Copy link
Contributor

Thearas commented Mar 3, 2026

run buildall

@yiguolei yiguolei merged commit 02110dc into branch-4.0 Mar 3, 2026
26 of 29 checks passed
@github-actions github-actions bot deleted the auto-pick-60954-branch-4.0 branch March 3, 2026 09:46
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.

4 participants