Skip to content

Commit

Permalink
Merge pull request #2141 from mabel-dev/#2104
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer authored Dec 22, 2024
2 parents 1cc86ec + cb275e4 commit 3421427
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opteryx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__build__ = 909
__build__ = 910

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
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 3421427

Please sign in to comment.