Repository navigation
fix: update tsfile cli and add auto-updating boundary in CLAUDE.md - #1108
Open
Alchuang22-dev wants to merge 5 commits into
Open
Alchuang22-dev wants to merge 5 commits into
Alchuang22-dev wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
| storage::EncoderFactory::alloc_value_encoder(encoding, type); | ||
| auto* decoder = | ||
| storage::DecoderFactory::alloc_value_decoder(encoding, type); | ||
| const bool supported = encoder != nullptr && decoder != nullptr; |
| namespace tsfile_cli { | ||
|
|
||
| StagedOutput::StagedOutput() : file_(std::tmpfile()), stream_(this) { | ||
| setp(buffer_, buffer_ + sizeof(buffer_)); |
Contributor
Author
There was a problem hiding this comment.
buffer_ has fixed size char[65536], which is not a pointer. So the issue may be a misinformation.
| if (file_ == nullptr) return -1; | ||
| const size_t size = static_cast<size_t>(pptr() - pbase()); | ||
| if (std::fwrite(buffer_, 1, size, file_) != size) return -1; | ||
| setp(buffer_, buffer_ + sizeof(buffer_)); |
Contributor
Author
There was a problem hiding this comment.
Same with the last issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary