Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove serialization non C.41 constructors from index_read_state_from_capnp. #4670

Merged

Conversation

abigalekim
Copy link
Contributor

@abigalekim abigalekim commented Jan 26, 2024

Made index_read_state_from_capnp C41 compliant.

TYPE: NO_HISTORY
DESC: Remove serialization non C.41 constructors from index_read_state_from_capnp

Copy link

@abigalekim abigalekim requested a review from KiterLuc January 26, 2024 07:37
tiledb/sm/serialization/query.cc Outdated Show resolved Hide resolved
@abigalekim abigalekim requested a review from KiterLuc January 30, 2024 00:30
@abigalekim abigalekim changed the title Remove serialization non C.41 constructors from index_read_state_from_capnp Remove serialization non C.41 constructors from index_read_state_from_capnp. Jan 30, 2024
tiledb/sm/query/readers/sparse_index_reader_base.h Outdated Show resolved Hide resolved
tiledb/sm/query/readers/sparse_index_reader_base.h Outdated Show resolved Hide resolved
tiledb/sm/query/readers/sparse_index_reader_base.h Outdated Show resolved Hide resolved
*/
ReadState* read_state();
ReadState& read_state();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Audit the code and see if the only reason we need this is because we want to update the read state. If so, let's rename to void set_read_state(...)

tiledb/sm/serialization/query.cc Outdated Show resolved Hide resolved
@abigalekim abigalekim requested a review from KiterLuc January 30, 2024 23:13
Copy link
Contributor

@KiterLuc KiterLuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweaks.

* Return whether the tiles that will be processed are loaded in memory.
* @return Done adding result tiles.
*/
const bool& done_adding_result_tiles() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const bool& done_adding_result_tiles() const {
bool done_adding_result_tiles() const {

* @param done_adding_result_tiles Done adding result tiles.
* @return void
*/
inline void set_done_adding_result_tiles(bool done_adding_result_tiles) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be changed from false to true... Remove the parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't true--this code is in sparse_index_reader_base.cc.

Status SparseIndexReaderBase::load_initial_data() {
  if (initial_data_loaded_) {
    return Status::Ok();
  }

  auto timer_se = stats_->start_timer("load_initial_data");
  read_state_.set_done_adding_result_tiles(false);

Additionally, there is code where this occurs in sparse_global_order_reader.cc and sparse_unordered_with_dups_reader.cc:

read_state_.set_done_adding_result_tiles(done_adding_result_tiles);

tiledb/sm/query/readers/sparse_index_reader_base.h Outdated Show resolved Hide resolved
tiledb/sm/query/readers/sparse_index_reader_base.h Outdated Show resolved Hide resolved
@abigalekim abigalekim requested a review from KiterLuc February 1, 2024 21:21
@ihnorton ihnorton closed this Feb 2, 2024
@ihnorton ihnorton reopened this Feb 2, 2024
@KiterLuc KiterLuc force-pushed the abigalekim/sc-40051/remove-serialization-non-c-41-constructors branch from 601f451 to a7a5909 Compare February 5, 2024 09:47
@KiterLuc KiterLuc force-pushed the abigalekim/sc-40051/remove-serialization-non-c-41-constructors branch from a7a5909 to 695399f Compare February 5, 2024 19:48
@KiterLuc KiterLuc merged commit 47b3eb8 into dev Feb 6, 2024
63 checks passed
@KiterLuc KiterLuc deleted the abigalekim/sc-40051/remove-serialization-non-c-41-constructors branch February 6, 2024 12:14
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.

3 participants