Skip to content

insert_row never flushes the buffer #8

@andrejgou

Description

@andrejgou

insert_row will never flush if force_flush is not set to True.

In this snippet, the _insert_ctx dict membership check is using table_name, but we're only ever adding dict entries with fully_qual_table_name as the key, so every time insert_row is called, a new InsertContext is created and the buffer will never get filled.

fully_qual_table_name = f"{schema_name}.{table_name}"
if table_name not in self._insert_ctx:
    self._insert_ctx[fully_qual_table_name] = InsertContext(
    self, table_name, schema_name
)
ctx = self._insert_ctx[fully_qual_table_name]

Offending line: https://github.com/risingwavelabs/risingwave-py/blob/4960b445e9ccd6db5fcc4e8d0dbd9bc523fca08a/risingwave/core.py#L362C12-L362C22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions