Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Dec 22, 2024
1 parent 1cc86ec commit a4322cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opteryx/operators/async_read_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def execute(self, morsel, **kwargs) -> Generator:
# due to a read-after-free type error
start = time.monotonic_ns()
blob_bytes = self.pool.read_and_release(reference, zero_copy=False)
self.statistics.bytes_read += len(blob_bytes)
decoded = decoder(
blob_bytes, projection=self.columns, selection=self.predicates
)
Expand All @@ -193,6 +194,7 @@ def execute(self, morsel, **kwargs) -> Generator:

self.statistics.blobs_read += 1
self.statistics.rows_read += morsel.num_rows
self.statistics.bytes_processed += morsel.nbytes

yield morsel
except Exception as err:
Expand Down
2 changes: 2 additions & 0 deletions opteryx/operators/function_dataset_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,7 @@ def execute(self, morsel, **kwargs) -> Generator:
table = data

self.statistics.columns_read += len(table.column_names)
self.statistics.rows_read += table.num_rows
self.statistics.bytes_processed += table.nbytes

yield table
1 change: 1 addition & 0 deletions opteryx/operators/read_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def execute(self, morsel, **kwargs) -> Generator:
self.statistics.time_reading_blobs += time.monotonic_ns() - start_clock
self.statistics.blobs_read += 1
self.statistics.rows_read += morsel.num_rows
self.statistics.bytes_processed += morsel.nbytes
yield morsel
start_clock = time.monotonic_ns()
if morsel:
Expand Down

0 comments on commit a4322cc

Please sign in to comment.