Skip to content

fix: update tsfile cli and add auto-updating boundary in CLAUDE.md - #1108

Merged
ColinLeeo merged 6 commits into
apache:developfrom
Alchuang22-dev:fix/cli-skills-11
Nov 18, 2026
Merged

ColinLeeo merged 6 commits into
apache:developfrom
Alchuang22-dev:fix/cli-skills-11

Conversation

@Alchuang22-dev

Copy link
Copy Markdown
Contributor

Summary

  • Replace whole-result memory buffering with disk-backed stdout staging and 64 KiB publishing, preserving failure atomicity. Stream exports directly to their existing temporary targets.
  • Release previous rows’ materialized strings to prevent SDK memory accumulation during large reads.
  • Reuse SDK encoding names and encoder/decoder factories for CLI validation, adding ALP support and correcting the supported type/encoding combinations.
  • Add regression coverage for 160 type/encoding combinations, bounded output writes, output failures, and row-memory reclamation.
  • Update skills and CLI documentation, and require SDK changes to synchronize applicable CLI functionality, tests, and skills in the same change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

GORILLA_V1 accepts CSV NaN values despite reserving NaN as an end sentinel, allowing successful writes that fail to round-trip and requiring input rejection plus an embedded-NaN regression test.

1 open issue
What changed in this PR

This PR reduces memory use in the C++ CLI’s row-output path and aligns encoding validation with SDK capabilities, including ALP support.

Changes:

  • Stage stdout on disk, publish in 64 KiB blocks, and stream exports to temporary targets.
  • Reclaim previous rows’ materialized strings and add output and codec regression coverage.
  • Update documentation and require SDK changes to synchronize applicable CLI functionality, tests, and skills.
File Description
skills/​tsfile/​references/​encoding-compression.md Document CLI codec support and RLE precision.
skills/​tsfile/​references/​cpp.md Clarify result-row string lifetimes.
skills/​tsfile-cli/​SKILL.md Update output staging and codec guidance.
cpp/​tools/​skills/​tsfile-cli/​SKILL.md Synchronize packaged CLI guidance.
cpp/​tools/​README.md Explain disk staging and expanded encoding support.
cpp/​tools/​format/​staged_output.h Declare disk-backed output staging.
cpp/​tools/​format/​staged_output.cc Implement buffered staging and publication.
cpp/​tools/​format/​output_format.cc Reuse SDK encoding names.
cpp/​tools/​commands/​row_query.cc Integrate optional disk-backed staging.
cpp/​tools/​commands/​commands.h Expose the output-staging option.
cpp/​tools/​commands/​cmd_write.cc Validate encodings through SDK factories.
cpp/​tools/​commands/​cmd_export.cc Bypass redundant export staging.
cpp/​test/​tools/​output_format_test.cc Test staging, output failures, and encoding names.
cpp/​test/​tools/​command_e2e_test.cc Verify bounded publication writes.
cpp/​test/​tools/​codec_round_trip_test.cc Exercise 160 type/encoding combinations.
cpp/​test/​reader/​block/​reusable_tsblock_test.cc Test row-string memory reclamation.
cpp/​src/​reader/​table_result_set.cc Release previous rows’ string storage.
CLAUDE.md Require SDK, CLI, and skill synchronization.

Review effort: Balanced

Comment thread cpp/tools/commands/cmd_write.cc Resolved
Comment thread cpp/tools/format/staged_output.cc Fixed
Comment thread cpp/tools/format/staged_output.cc Fixed
@ColinLeeo
ColinLeeo requested a balanced review from Copilot November 16, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open issues

Review effort: Lite

Comment thread cpp/tools/commands/cmd_write.cc Resolved
Comment thread cpp/tools/commands/cmd_write.cc Resolved
Comment thread cpp/tools/format/staged_output.cc Resolved
Use std::end(buffer_) for the streambuf put-area bounds so CodeQL's
cpp/suspicious-add-sizeof check no longer flags the char array, and guard
publish() against a null tmpfile stream before touching it.
@ColinLeeo
ColinLeeo merged commit 7f15d6e into apache:develop Nov 18, 2026
49 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.

4 participants