You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@tsfile.apache.org by "Alchuang22-dev (via GitHub)" <gi...@apache.org> on 2026/06/11 09:33:36 UTC
[PR] Add sketch command in tsfile-cli from `TsFileSketchTool` [tsfile]
Alchuang22-dev opened a new pull request, #838:
URL: https://github.com/apache/tsfile/pull/838
## 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
- [x] `cmake --build cpp/build/Debug --target tsfile_cli -j 4`
- [x] `cmake --build cpp/build/Debug --target TsFile_Test -j 4`
- [x] `cpp/build/Debug/test/lib/TsFile_Test --gtest_filter='CliE2E.Sketch*'`
- [x] `cpp/build/Debug/test/lib/TsFile_Test --gtest_filter='CliE2E.*:RunCliTest.*'`
- [x] `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`
- [x] Compared Java and C++ sketch output for real tsfile `large_data.tsfile` with `cmp`; result: `cmp_exit=0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add sketch command in tsfile-cli from `TsFileSketchTool` [tsfile]
Posted by "ColinLeeo (via GitHub)" <gi...@apache.org>.
ColinLeeo commented on PR #838:
URL: https://github.com/apache/tsfile/pull/838#issuecomment-4748338414
You can show the command’s output/result in the comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add sketch command in tsfile-cli from `TsFileSketchTool` [tsfile]
Posted by "ColinLeeo (via GitHub)" <gi...@apache.org>.
ColinLeeo merged PR #838:
URL: https://github.com/apache/tsfile/pull/838
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add sketch command in tsfile-cli from `TsFileSketchTool` [tsfile]
Posted by "Alchuang22-dev (via GitHub)" <gi...@apache.org>.
Alchuang22-dev commented on PR #838:
URL: https://github.com/apache/tsfile/pull/838#issuecomment-5101052842
The output of the command shown as following format:
```
TsFile Sketch
file path: /**/timeseek-opensource/IoTDB-TimeSeek/timeseek_codex/workspaces/tsfile/large_data.tsfile
file length: 18429
POSITION|CONTENT
|||||||||||||||||||||
TsFile Info
0| [magic head] TsFile
6| [version number] 4
|||||||||||||||||||||
Chunk Groups
7| [ChunkGroup] of sensor_data.d000, num of Chunks:2
...
16473| [TsFileMetadata] TableIndexRootCnt=1
18166| [TsFileMetadata] TableSchemaCnt=1
18250| [Bloom Filter Size] bit vector byte array length=995
18254| [Bloom Filter] , filterCapacity=792, hashFunctionSize=5
18419| [TsFileMetadataSize] 1946
18423| [magic tail] TsFile
18429| END of TsFile
IndexOfTimerseriesIndex Tree
...
TsFile Sketch End
```
the same as java edition
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org