PreWriteCheck Extended Analysis Check
PreWriteCheck is an extended analysis check that verifies correctness of a logical query plan with regard to InsertIntoTable unary logical operator (right before analysis can be considered complete).
PreWriteCheck is part of the extended analysis check rules of the logical Analyzer in BaseSessionStateBuilder and HiveSessionStateBuilder.
PreWriteCheck is simply a function of LogicalPlan that…FIXME
Executing Function — apply Method
|
1 2 3 4 5 |
apply(plan: LogicalPlan): Unit |
|
Note
|
apply is part of Scala’s scala.Function1 contract to create a function of one parameter.
|
apply traverses the input logical query plan and finds InsertIntoTable unary logical operators.
-
For an
InsertIntoTablewith a LogicalRelation…FIXME -
For any
InsertIntoTable,applythrows aAnalysisExceptionif the logical plan for the table to insert into is neither a LeafNode nor one of the following leaf logical operators: Range, OneRowRelation, LocalRelation.12345Inserting into an RDD-based table is not allowed.
spark技术分享