Skip to content

Commit 621cc62

Browse files
authored
Revert 22092 changes in 2.2-dev due to oom (#22157)
### **User description** ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #22151 ## What this PR does / why we need it: Revert 22092 changes in 2.2-dev due to oom ___ ### **PR Type** Bug fix ___ ### **Description** - Revert changes from PR #22092 causing OOM issues - Add vector column DML operation restriction - Import types package for array type checking ___ ### **Changes diagram** ```mermaid flowchart LR A["Import types package"] --> B["Check column types"] B --> C["Block vector column DML"] C --> D["Prevent OOM issues"] ``` ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>dml_context.go</strong><dd><code>Add vector column DML restriction</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> pkg/sql/plan/dml_context.go <li>Add import for <code>types</code> package<br> <li> Add validation loop to check column types<br> <li> Return error for vector/array columns in DML operations </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22157/files#diff-6e952c10166b807c3a9ef06cde3d549ebbee6e29eb2ffd1aeceb9eab8590fd3e">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about Qodo Merge usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
1 parent 6f28646 commit 621cc62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/sql/plan/dml_context.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package plan
1717
import (
1818
"github.com/matrixorigin/matrixone/pkg/catalog"
1919
"github.com/matrixorigin/matrixone/pkg/common/moerr"
20+
"github.com/matrixorigin/matrixone/pkg/container/types"
2021
"github.com/matrixorigin/matrixone/pkg/defines"
2122
"github.com/matrixorigin/matrixone/pkg/pb/plan"
2223
"github.com/matrixorigin/matrixone/pkg/sql/parsers/tree"
@@ -229,6 +230,12 @@ func (dmlCtx *DMLContext) ResolveSingleTable(ctx CompilerContext, tbl tree.Table
229230
return moerr.NewUnsupportedDML(ctx.GetContext(), "foreign key constraint")
230231
}
231232

233+
for _, col := range tableDef.Cols {
234+
if types.T(col.Typ.Id).IsArrayRelate() {
235+
return moerr.NewUnsupportedDML(ctx.GetContext(), "vector column")
236+
}
237+
}
238+
232239
isClusterTable := util.TableIsClusterTable(tableDef.GetTableType())
233240
accountId, err := ctx.GetAccountId()
234241
if err != nil {

0 commit comments

Comments
 (0)