Feature/tsfile dataframe runtime - #911
Conversation
9d69427 to
279c351
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #911 +/- ##
===========================================
+ Coverage 61.21% 61.24% +0.02%
===========================================
Files 740 746 +6
Lines 50571 51533 +962
Branches 8141 8341 +200
===========================================
+ Hits 30959 31562 +603
- Misses 18125 18356 +231
- Partials 1487 1615 +128 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5571775 to
ad746dc
Compare
4b409cb to
f3f84d7
Compare
f3f84d7 to
3cb8342
Compare
| common = os.path.commonpath([os.path.abspath(path) for path in paths]) | ||
| if not os.path.isdir(common): | ||
| common = os.path.dirname(common) | ||
| return os.path.join(common, INDEX_FILE_NAME) |
There was a problem hiding this comment.
The dataset index is always published as .tsfile_dataframe_index.tsidx under the common parent of the input files. Two TsFileDataFrame instances that share a directory but not the same file set will contend for that one path, rebuild on every mismatch, and can clobber each other. Please derive the index path from the file-set identity (or let the caller pass it), and add a same-directory / different-subset test.
TsFileDataFrame Runtime
Problem
When querying a dataset containing multiple TsFiles, the previous path repeatedly opened files, scanned metadata, and assembled results in Python. Query latency and process memory therefore increased with the number of files. Dataset-level schema validation and file-change detection were also incomplete, which could lead to incorrect merges or reads from stale files.
This PR introduces a persistent Dataset Index and a process-local Runtime. Dataset-level routing, schema information, and file generations are materialized once, while multiple processes can share the read-only index pages through mmap.
Core mechanisms
Persistent Dataset Index
SeriesLocatoridentifies the corresponding series metadata in a TsFile. The standard TsFile Reader remains responsible for parsingChunkMeta.TableSchemadefinitions, and timestamp uniqueness.Process-local Runtime
Query and Python integration
_mergeextension no longer links against C++libtsfile, avoiding dynamic-library lookup issues from the subpackage directory.Wheel packaging
Linux, macOS, and Windows wheel builds use bundled C++ dependencies:
This prevents macOS wheels from including Homebrew libraries with an incompatible deployment target and prevents Windows wheels from missing LZ4, LZMA, or zlib runtime dependencies.
Compatibility
TableSchemadefinitions are not silently merged by field union; they are kept as distinct schema variants or reported as conflicts.Validation
760 passed, 1 skipped196 passedgit diff --check: passed