Skip to content

refactor(utils): consolidate string and option handling - #249

Merged
SteNicholas merged 4 commits into
apache:mainfrom
lxy-9602:refactor-utils
Aug 27, 2026
Merged

refactor(utils): consolidate string and option handling#249
SteNicholas merged 4 commits into
apache:mainfrom
lxy-9602:refactor-utils

Conversation

@lxy-9602

@lxy-9602 lxy-9602 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Purpose

This PR consolidates duplicated string and option handling into the common utility classes.

The main changes are:

  • Align StringUtils edge-case behavior with the corresponding Java implementation, including replace, trim, and starts-with operations.
  • Add ASCII-based case conversion and case-insensitive comparison helpers.
  • Add OptionsUtils::GetNonEmptyValueFromMap and improve prefixed option extraction.
  • Replace duplicated string and option handling across REST, filesystem, schema validation, variant, and system-table code.
  • Reuse SpecialFields::CompleteSequenceAndValueKindField when constructing the postpone-bucket write schema.
  • Remove redundant parquet.read.enable-pre-buffer=false injection from compaction paths. Compaction always enables framework prefetch, which already disables Parquet pre-buffering, so mutating the format options is unnecessary.

Tests

Added or updated unit coverage for:

  • StringUtils edge cases and case-insensitive comparison.
  • OptionsUtils non-empty values and prefixed option extraction.
  • Case-insensitive local filesystem schemes.
  • Case-insensitive Parquet format validation.
  • Sequence snapshot property parsing.

API and Format

Documentation

Generative AI tooling

Generated-by: OpenAI Codex (GPT-5)

Comment thread src/paimon/common/utils/options_utils.h Outdated

@zjw1111 zjw1111 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

@SteNicholas SteNicholas left a comment

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.

LGTM.

@SteNicholas
SteNicholas merged commit 4027601 into apache:main Aug 27, 2026
16 checks passed
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.

3 participants