Skip to content

Conversation

@theory
Copy link
Contributor

@theory theory commented Nov 20, 2025

It converts the internal integer to a decimal string relative to the scale and precision. Not a blocker for my projects (I copied the code), but I am getting an error when using -D BUILD_SHARED_LIBS:

undefined symbol: _ZN4absllsERSoNS_6int128E

Presumably -D BUILD_SHARED_LIBS needs to also build and install the absl library.

@theory theory marked this pull request as ready for review November 20, 2025 21:08
@mshustov mshustov requested review from Copilot and slabko November 24, 2025 09:45
Copy link
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 a GetString method to the ColumnDecimal class that converts internal integer representations to human-readable decimal strings with proper scale and precision formatting.

Key Changes:

  • Added GetString method to ColumnDecimal class that formats decimal values as strings
  • Added comprehensive test coverage for the new method across various decimal types and edge cases

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
clickhouse/columns/decimal.h Declares the new GetString method with documentation
clickhouse/columns/decimal.cpp Implements decimal-to-string conversion logic with proper handling of scale, precision, and negative values
ut/client_ut.cpp Adds extensive test cases validating the string conversion for positive, negative, and edge-case decimal values

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

It converts the internal integer to a decimal string relative to the
scale and precision.
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