Uh oh!
There was an error while loading. Please reload this page.
Support materialized view load and insert - #3677
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| // 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.
Are you sure that this is correctcolumn(a, tmp_c) set(b=f(c), c=b)?
There was a problem hiding this comment.
Are you sure that this is correct
column(a, tmp_c) set(b=f(c), c=b)?
Fix done
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
EmmyMiao87
commented
Jun 8, 2020
Is it possible to unify the columns of schema change and materialized view into one logical process in insert stmt? |
Uh oh!
There was an error while loading. Please reload this page.
| * 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.
| * origColIdx2MVColumnhas1element: "3, __doris_materialized_view_bitmap_union_C" | |
| * origColIdx2MVColumnhas1element: "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.
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.
What's different between resultExpr and baseTblResultExpr
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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