Skip to content

feat: support bigint query params#487

Closed
dalechyn wants to merge 3 commits intoClickHouse:mainfrom
dalechyn:patch-1
Closed

feat: support bigint query params#487
dalechyn wants to merge 3 commits intoClickHouse:mainfrom
dalechyn:patch-1

Conversation

@dalechyn
Copy link
Copy Markdown
Contributor

@dalechyn dalechyn commented Nov 27, 2025

Merged here:

Summary

To support bigints in query params

Checklist

Delete items not relevant to your PR:

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 27, 2025

CLA assistant check
All committers have signed the CLA.

@mshustov mshustov requested review from Copilot and mshustov December 2, 2025 09:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for BigInt values in query parameters by extending the type checking logic to handle bigint types alongside numbers.

Key Changes:

  • Modified the type check in formatQueryParamsInternal to accept both number and bigint types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (value === Number.NEGATIVE_INFINITY) return '-inf'

if (typeof value === 'number') return String(value)
if (typeof value === 'number' || typeof value === 'bigint') return String(value)
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new bigint support lacks test coverage. Add test cases covering bigint values in query parameters, including edge cases like BigInt(0), very large positive/negative values, and bigints within arrays or tuples if those contexts are supported.

Copilot uses AI. Check for mistakes.
if (value === Number.NEGATIVE_INFINITY) return '-inf'

if (typeof value === 'number') return String(value)
if (typeof value === 'number' || typeof value === 'bigint') return String(value)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalechyn would it be possible to add a test?

Copy link
Copy Markdown
Collaborator

@peter-leonov-ch peter-leonov-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch 👍 I'd recommend to add a test somewhere around here.

@peter-leonov-ch
Copy link
Copy Markdown
Collaborator

@dalechyn you can pull / cherry-pick the unit test and lint fix changes from:

Thanks for your contribution! Let me know on how you'd like to proceed with your PR.

peter-leonov-ch added a commit that referenced this pull request Dec 16, 2025
Co-authored-by: Vladyslav Dalechyn <[email protected]>
@peter-leonov-ch
Copy link
Copy Markdown
Collaborator

Thanks again for your contribution, keep it coming!

image

Merged your original commits here with some added tests and prettier fixes:

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.

5 participants