ArcticDB
ArcticDB copied to clipboard
Staged segmend of only empty DataFrames throws when `sort_and_finalize_staged_data` is called
Describe the bug
If the staged segment is of only empty DataFrames (pd.DataFrame([])
) calling sort_and_finalize_staged_data
throws.
Steps to reproduce
import pandas as pd
import numpy as np
import arcticdb as adb
ac = adb.Arctic("lmdb://test")
lib = ac.get_library("test", create_if_missing=True)
lib.write("sym", pd.DataFrame([]), staged=True)
lib.sort_and_finalize_staged_data("sym")
Output:
Traceback (most recent call last):
File "...test.py", line 8, in <module>
lib.sort_and_finalize_staged_data("sym")
File "...\arcticdb\version_store\library.py", line 959, in sort_and_finalize_staged_data
self._nvs.version_store.sort_merge(symbol, None, mode == StagedDataFinalizeMethod.APPEND, prune_previous_versions=prune_previous_versions)
arcticdb_ext.exceptions.InternalException: E_ASSERTION_FAILURE Stream descriptor not found in pipeline context
Expected behavior This should succeed and be a noop.
Related issues Could be related to: #1736, #1737
OS, Python, Arctic versions
Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
OS: Windows-10-10.0.22631-SP0
ArcticDB: 4.5.0rc1