ArcticDB icon indicating copy to clipboard operation
ArcticDB copied to clipboard

lib.read report ('E_ASSERTION_FAILURE Truncate bounds start_row=12560 end_row=12560 outside valid range 12560',)

Open deyu9999 opened this issue 1 year ago • 1 comments

Describe the bug

working code: vertionItem = ac_lib.read(symbol=order_book_id, date_range=(start_date, end_date), columns=columns) not working code: vertionItem = ac_lib.read(symbol=order_book_id, query_builder=q, columns=columns)

when using not working code, got error reported here: [2024-09-24 15:48:57.289] [arcticdb] [error] E_ASSERTION_FAILURE Truncate bounds start_row=12560 end_row=12560 outside valid range 12560 when using working code, all else same, I got expected data.

Don't know why.

Steps/Code to Reproduce

working code: vertionItem = ac_lib.read(symbol=order_book_id, date_range=(start_date, end_date), columns=columns) not working code: vertionItem = ac_lib.read(symbol=order_book_id, query_builder=q, columns=columns)

def query_bar_lib(self, lib_name: str, order_book_id: str, start_date: datetime, end_date: datetime, columns: [] = None) -> DataFrame:
    """
    query table
    """
    try:
        if not self.ac.has_library(lib_name):
            return None

        ac_lib = self.ac.get_library(lib_name)
        q = QueryBuilder()
        if start_date is None:
            start_date = datetime(1990, 1, 1)
        if end_date is None:
            end_date = datetime.now()
        q.date_range((start_date, end_date))

        vertionItem = ac_lib.read(
            symbol=order_book_id, query_builder=q, columns=columns)

        return vertionItem.data
    except Exception as e:
        raise e
        return None

Expected Results

get expected results and no error raised.

OS, Python Version and ArcticDB Version

Python: 3.9.16 (main, May 15 2023, 23:46:34) [GCC 11.2.0] OS: Linux-5.4.119-19-0009.11-x86_64-with-glibc2.28 ArcticDB: 4.2.1

Backend storage used

Tencent COS

Additional Context

No response

deyu9999 avatar Sep 24 '24 08:09 deyu9999