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

lib._nvs.get_num_rows incorrect for pickled symbol #1552

Open
muhammadhamzasajjad opened this issue May 2, 2024 · 2 comments
Open

lib._nvs.get_num_rows incorrect for pickled symbol #1552

muhammadhamzasajjad opened this issue May 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@muhammadhamzasajjad
Copy link
Collaborator

muhammadhamzasajjad commented May 2, 2024

Describe the bug

When a pickled symbol is written, lib._nvs.get_num_rows returns incorrect row count. Please view the repro code.

Steps/Code to Reproduce

lib.write_pickle("sym_pickled", pd.date_range("2024-03-01", "2024-03-31", freq="B"))
lib._nvs.get_num_rows("sym_pickled")
89 # expected  21
lib.get_description("sym_pickled")
SymbolDescription(columns=(NameWithDType(name='bytes', dtype=value_type: UINT
size_bits: S64
),), index=NameWithDType(name=[], dtype=[]), index_type='NA', row_count=89, last_update_time=Timestamp('2024-05-08 16:34:17.471168900+0000', tz='UTC'), date_range=(numpy.datetime64('NaT'), numpy.datetime64('NaT')), sorted='UNKNOWN')

Expected Results

21

OS, Python Version and ArcticDB Version

Python: 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
OS: Windows-10-10.0.22631-SP0
ArcticDB: 4.4.1

Backend storage used

LMDB

Additional Context

No response

@muhammadhamzasajjad muhammadhamzasajjad added the bug Something isn't working label May 2, 2024
@jamesmunro
Copy link
Collaborator

get_num_rows doesn't exist on Library, it's lib._nvs.get_num_rows.
Can you check lib.get_description?

@muhammadhamzasajjad
Copy link
Collaborator Author

get_num_rows doesn't exist on Library, it's lib._nvs.get_num_rows.
Can you check lib.get_description?

The provided code was using V1 API where lib is instance of NativeVersionStore, because this issue came from Man internally. I will update the repro with lib._nvs.get_num_rows

@muhammadhamzasajjad muhammadhamzasajjad changed the title lib.get_num_rows incorrect for pickled symbol lib._nvs.get_num_rows incorrect for pickled symbol May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants