[Bug](Materialized-View) forbiden mv rewrite on create view and remove duplicate method getIsM… (#17194)
1. forbiden mv rewrite on create view to avoid select fail 2. remove duplicate method getIsMaterialized
This commit is contained in:
@ -78,6 +78,7 @@ public class CreateViewStmt extends BaseViewStmt {
|
||||
|
||||
// Analyze view define statement
|
||||
Analyzer viewAnalyzer = new Analyzer(analyzer);
|
||||
viewDefStmt.forbiddenMVRewrite();
|
||||
viewDefStmt.analyze(viewAnalyzer);
|
||||
|
||||
createColumnAndViewDefs(analyzer);
|
||||
|
||||
@ -189,7 +189,7 @@ public class DescriptorTable {
|
||||
for (TupleDescriptor tupleD : tupleDescs.values()) {
|
||||
// inline view of a non-constant select has a non-materialized tuple descriptor
|
||||
// in the descriptor table just for type checking, which we need to skip
|
||||
if (tupleD.getIsMaterialized()) {
|
||||
if (tupleD.isMaterialized()) {
|
||||
result.addToTupleDescriptors(tupleD.toThrift());
|
||||
// an inline view of a constant select has a materialized tuple
|
||||
// but its table has no id
|
||||
|
||||
@ -169,10 +169,6 @@ public class TupleDescriptor {
|
||||
return byteSize;
|
||||
}
|
||||
|
||||
public boolean getIsMaterialized() {
|
||||
return isMaterialized;
|
||||
}
|
||||
|
||||
public void setIsMaterialized(boolean value) {
|
||||
isMaterialized = value;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ public class TupleIsNullPredicate extends Predicate {
|
||||
// Assert that all tids are materialized.
|
||||
for (TupleId tid : tids) {
|
||||
TupleDescriptor tupleDesc = analyzer.getTupleDesc(tid);
|
||||
Preconditions.checkState(tupleDesc.getIsMaterialized());
|
||||
Preconditions.checkState(tupleDesc.isMaterialized());
|
||||
}
|
||||
// Perform the wrapping.
|
||||
List<Expr> result = Lists.newArrayListWithCapacity(inputExprs.size());
|
||||
|
||||
@ -787,7 +787,7 @@ public class AnalyticPlanner {
|
||||
|
||||
for (WindowGroup g : windowGroups) {
|
||||
TupleDescriptor outputTuple = g.physicalOutputTuple;
|
||||
Preconditions.checkState(outputTuple.getIsMaterialized());
|
||||
Preconditions.checkState(outputTuple.isMaterialized());
|
||||
Preconditions.checkState(outputTuple.getByteSize() != -1);
|
||||
totalOutputTupleSize += outputTuple.getByteSize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user