Repository navigation
Conversation
Exercise the C parts of the wrapper that the Python bindings use but the C++ suite never reached: global time encoding/compression setters and getters, tablet row-count/typed adders, writer flush, result-set value getters and metadata accessors, binary cell copies, reader query variants (offset/limit, inverted range, batch), Arrow block export and Arrow table writes through both writers, tag filter and/or/not composition, schema-array release helpers, and the legacy device/record write path. tsfile_cwrapper.cc: 62.5% -> 73.5% line coverage (163/168 functions); arrow_c.cc: 69.9% -> 77.5% (27/28 functions). The remaining prepared-series entry points need a dataset-index locator that is not exposed through the C API.
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
The C wrapper is the surface the Python bindings call, but several of its entry points had zero C++ test coverage (41 of 168 functions in
tsfile_cwrapper.cc).cpp/test/cwrapper/cwrapper_extended_test.ccnow covers:set_allow_non_decreasing_timestampstablet_get_cur_row_size, typed adders by name/index (float,bool,int32)tsfile_writer_flushint32/int64/float/double/bool),is_null_by_index, binary cell copies,get_metadataplus the metadata accessors, andfree_result_set_meta_datatsfile_reader_query_tablewith offset/limit and an inverted range,tsfile_query_table_batch, andtsfile_result_set_get_next_tsblock_as_arrowtsfile_writer_write_arrowand_tsfile_writer_write_arrow_table), building the input struct from aTsBlockand/or/notcomposition andtsfile_query_table_with_tag_filtertsfile_free_table_schema_array,tsfile_free_device_schema_array)_tsfile_writer_register_device, typed record inserts,_tsfile_writer_write_ts_record,_tsfile_writer_flush) andtsfile_query_table_on_tree_tsfile_writer_write_tableCoverage:
tsfile_cwrapper.cc62.5% -> 73.5% lines (163/168 functions),arrow_c.cc69.9% -> 77.5% (27/28 functions). The five remaining prepared-series functions require a dataset-index locator that the C API does not expose, so they stay unreachable from C++ tests.Test plan
./mvnw -B clean verify -P with-java,with-python -Denable.lzma2=ON(Java, C++, Python; 1858 C++ tests passed)./mvnw -B clean verify -P with-cpp -Denable.asan=ON -Dbuild.type=RelWithDebInfo -Denable.lzma2=ON(1859 tests, 0 failed; macOS run used the Xcode 26.6 toolchain withASAN_OPTIONS=detect_container_overflow=0for the uninstrumented ANTLR runtime)./mvnw spotless:check -P with-java,with-python