-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Support materialized view load and insert #3677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
| // The extension column of the materialized view is added to the expression evaluation of load | ||
| for (Column column : tbl.getFullSchema()) { | ||
| if (column.getDefineExpr() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that this is correctcolumn(a, tmp_c) set(b=f(c), c=b)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that this is correct
column(a, tmp_c) set(b=f(c), c=b)?
Fix done
|
Is it possible to unify the columns of schema change and materialized view into one logical process in insert stmt? |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| * we should add them to the end of targetColumns. | ||
| * eg: origin targetColumns: (A,B,C), shadow column: __doris_materialized_view_bitmap_union_C | ||
| * after processing, targetColumns: (A, B, C, __doris_materialized_view_bitmap_union_C), and | ||
| * origColIdx2MVColumn has 1 element: "3, __doris_materialized_view_bitmap_union_C" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * origColIdx2MVColumn has 1 element: "3, __doris_materialized_view_bitmap_union_C" | |
| * origColIdx2MVColumn has 1 element: "2, __doris_materialized_view_bitmap_union_C" |
| String origName = ((SlotRef) slots.get(0)).getColumnName(); | ||
| SlotRef refColumn = column.getRefColumn(); | ||
| if (refColumn == null) { | ||
| ErrorReport.reportAnalysisException(ErrorCode.ERR_BAD_FIELD_ERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to show which field is error.
| queryStmt.getResultExprs().add(Expr.substituteList(Lists.newArrayList(expr), smap, analyzer, false).get(0)); | ||
| Expr e = Expr.substituteList(Lists.newArrayList(mvColumn.getDefineExpr()), smap, analyzer, false).get(0); | ||
| queryStmt.getResultExprs().add(e); | ||
| queryStmt.getBaseTblResultExprs().add(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's different between resultExpr and baseTblResultExpr
EmmyMiao87
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit mainly supports load bitmap_union, hll_union, and count materialized views.
The main changes are as follows:
1、insert stmt support load extend column
2、load stmt support load extend column
Issue : #3344