Skip to content

Add sketch command in tsfile-cli from TsFileSketchTool#838

Open
Alchuang22-dev wants to merge 2 commits into
apache:developfrom
Alchuang22-dev:feat-print-tsfile
Open

Add sketch command in tsfile-cli from TsFileSketchTool#838
Alchuang22-dev wants to merge 2 commits into
apache:developfrom
Alchuang22-dev:feat-print-tsfile

Conversation

@Alchuang22-dev

Copy link
Copy Markdown
Contributor

Summary

Content

Migrates the Java TsFileSketchTool print/self-check capability into tsfile-cli as the new sketch command.

Known Limitation

We must mention that the Java edition has a stream-based fallback for very large metadata/index regions. The C++ implementation currently buffers these regions and does not implement the same streaming fallback. If a metadata or chunk data range exceeds the C++ sketch reader buffer limit, the CLI reports truncated output with an explicit blocker instead of attempting Java-equivalent streaming traversal.

Test Plan

  • cmake --build cpp/build/Debug --target tsfile_cli -j 4
  • cmake --build cpp/build/Debug --target TsFile_Test -j 4
  • cpp/build/Debug/test/lib/TsFile_Test --gtest_filter='CliE2E.Sketch*'
  • cpp/build/Debug/test/lib/TsFile_Test --gtest_filter='CliE2E.*:RunCliTest.*'
  • env PATH=/opt/homebrew/opt/llvm@17/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ./mvnw -P with-cpp -pl :tsfile-cpp spotless:check
  • Compared Java and C++ sketch output for real tsfile large_data.tsfile with cmp; result: cmp_exit=0.

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