Skip to content

fix: tighten Power BI DirectQuery compatibility - #7

Merged
iamlinjunhong merged 1 commit into
mainfrom
codex/powerbi-directquery-contract
Aug 11, 2026
Merged

iamlinjunhong merged 1 commit into
mainfrom
codex/powerbi-directquery-contract

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Collaborator

Summary

  • normalize ODBC TYPE_NAME values case-insensitively before Power Query rewrites integer, VARCHAR/ENUM/SET, and FLOAT cast targets
  • advertise LimitClauseKind.Limit instead of LimitOffset, because MatrixOne does not yet accept the offset-only form required by Power Query (matrixorigin/matrixone#26769)
  • extend the public-API suite with SQLDescribeParam/SQLNumParams capability checks and a DirectQuery-shaped prepared query covering a derived table, COALESCE, typed filters, aggregation, HAVING, ordering, and parameterized LIMIT/OFFSET
  • retain offset-only prepared execution as an issue-linked XFAIL and refresh the compatibility snapshot for current MatrixOne main

Why

MatrixOne releases have returned INFORMATION_SCHEMA.COLUMNS.DATA_TYPE with different casing. The connector's case-sensitive metadata hook therefore skipped Power BI's safe CAST target rewrites on affected releases.

Power Query's ODBC guidance also requires all three forms (LIMIT, LIMIT ... OFFSET, and offset without limit) for LimitClauseKind.LimitOffset. MatrixOne supports the first two but rejects the third with native error 1064, so the connector must advertise the conservative capability until the server gap is fixed.

Validation

  • full macOS ARM64 driver build
  • MatrixOne.mez build and archive validation
  • MatrixOne main d0057b3503611022cdf9a6e24c98065d209eb8e4
  • Unicode driver: 13 passed, 5 issue-linked XFAIL, 0 failed
  • ANSI driver: 13 passed, 5 issue-linked XFAIL, 0 failed
  • git diff --check

This validates the public ODBC contract and generated-SQL shape. A real Power BI Desktop and on-premises gateway run on Windows remains a separate release gate.

@iamlinjunhong
iamlinjunhong merged commit 5757c9f into main Aug 11, 2026
3 checks passed
@iamlinjunhong
iamlinjunhong deleted the codex/powerbi-directquery-contract branch August 12, 2026 02:52
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.

1 participant