From 8a6b5ced6be8e725cda38e8c50673c7fc3800d97 Mon Sep 17 00:00:00 2001 From: huber <634626165@qq.com> Date: Mon, 2 Mar 2026 13:25:11 +0800 Subject: [PATCH] fix: add missing chunk_data column to OceanBase schema migration (#13306) ### What problem does this PR solve? When using OceanBase as the document storage engine, parsing and inserting chunks with chunk_data (e.g., table parser row data) fails with the following error: ``` [ERROR][Exception]: Insert chunk error: ['Unconsumed column names: chunk_data'] This happens because the chunk_data column was recently introduced but was omitted from the EXTRA_COLUMNS list in rag/utils/ob_conn.py ``` As a result, the automatic schema migration for existing OceanBase tables does not append the missing chunk_data column, causing the underlying pyobvector or SQLAlchemy to raise an unconsumed column names error during data insertion. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ### What is the solution? Added column_chunk_data to the EXTRA_COLUMNS list in ``` rag/utils/ob_conn.py ``` This ensures that the OceanBase connection wrapper can correctly detect the missing column and automatically alter existing chunk tables to include the chunk_data field during initialization. --- rag/utils/ob_conn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/utils/ob_conn.py b/rag/utils/ob_conn.py index c20a4a45b2..916425e7a7 100644 --- a/rag/utils/ob_conn.py +++ b/rag/utils/ob_conn.py @@ -127,7 +127,7 @@ FTS_COLUMNS_TKS: list[str] = [ ] # Extra columns to add after table creation (for migration) -EXTRA_COLUMNS: list[Column] = [column_order_id, column_group_id, column_mom_id] +EXTRA_COLUMNS: list[Column] = [column_order_id, column_group_id, column_mom_id, column_chunk_data] class SearchResult(BaseModel):