Skip to content

chore(ibis): enhance the function list of BigQuery and MSSQL#1336

Merged
douenergy merged 3 commits intoCanner:mainfrom
goldmedal:fix/bq-miss-func
Oct 3, 2025
Merged

chore(ibis): enhance the function list of BigQuery and MSSQL#1336
douenergy merged 3 commits intoCanner:mainfrom
goldmedal:fix/bq-miss-func

Conversation

@goldmedal
Copy link
Copy Markdown
Contributor

@goldmedal goldmedal commented Sep 30, 2025

BigQuery

MSSQL

  • isnull
  • year
  • format
  • group_concat

Summary by CodeRabbit

  • New Features

    • Local query runner: improved MSSQL support — uses T-SQL dialect and adds connection validation for MSSQL sources.
  • Tests

    • BigQuery connector tests updated to expect 179 remote functions.
    • MSSQL connector tests updated to reflect 10 additional remote functions in listings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 30, 2025

Walkthrough

Updated test expectations for BigQuery and MSSQL function-list counts, and added MSSQL-specific handling and imports to the local query runner (validation and connection retrieval, plus transpile dialect set to "tsql"). No public API signatures were changed.

Changes

Cohort / File(s) Summary
BigQuery tests
ibis-server/tests/routers/v3/connector/bigquery/test_functions.py
Adjust expected count in test_function_list from 178 to 179; other assertions unchanged.
MSSQL tests
ibis-server/tests/routers/v3/connector/mssql/test_functions.py
Updated expected function list length: DATAFUSION_FUNCTION_COUNT + 6DATAFUSION_FUNCTION_COUNT + 10; still asserts presence/details of sysdatetime.
Local query runner
ibis-server/tools/query_local_run.py
Added MSSqlConnectionInfo import; special-case data_source == "mssql" to validate with MSSqlConnectionInfo.model_validate_json, obtain connection via DataSourceExtension.get_mssql_connection, and set transpile dialect to tsql.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as query_local_run CLI
  participant Runner as query_local_run
  participant Validator as MSSqlConnectionInfo
  participant Ext as DataSourceExtension
  participant Transpiler as Ibis transpile

  User->>CLI: run query with data_source="mssql"
  CLI->>Runner: dispatch request (data_source="mssql")
  Runner->>Validator: MSSqlConnectionInfo.model_validate_json(connection_info)
  alt validation OK
    Runner->>Ext: get_mssql_connection(connection_info)
    Ext-->>Runner: mssql connection
    Runner->>Transpiler: transpile(expr, dialect="tsql")
    Transpiler-->>Runner: SQL (tsql)
    Runner-->>User: execute and return results
  else validation fails
    Validator-->>Runner: raise validation error
    Runner-->>User: surface error
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • douenergy
  • wwwy3y3

Poem

I nibble code, I hop and pry,
Counts increased beneath the sky.
MSSQL learns to speak in tsql tune,
BigQuery gained a little moon.
Hooray — a patch, a carrot, done! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely describes the key change—updating the function lists for BigQuery and MSSQL—without unnecessary detail or ambiguity, making it easy to understand the primary purpose of the pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added bigquery ibis python Pull requests that update Python code labels Sep 30, 2025
@goldmedal goldmedal requested a review from douenergy September 30, 2025 06:16
@goldmedal goldmedal changed the title chore(ibis): add date and group_concat function for BigQuery chore(ibis): enhance the function list of BigQuery and MSSQL Oct 2, 2025
@goldmedal
Copy link
Copy Markdown
Contributor Author

BigQuery has been tested locally

@douenergy douenergy merged commit cd600c3 into Canner:main Oct 3, 2025
6 of 7 checks passed
nhaluc1005 pushed a commit to nhaluc1005/text2sql-practice that referenced this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bigquery ibis python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants