Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yufei-YAO committed Nov 12, 2024
1 parent 8819d6f commit 61d5f30
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private Plan bindOlapTableSink(MatchingContext<UnboundTableSink<Plan>> ctx) {
// we need to insert all the columns of the target table
// although some columns are not mentions.
// so we add a projects to supply the default value.
if (boundSink.getCols().size() >= child.getOutput().size() + extraColumnsNum) {
if (boundSink.getCols().size() > child.getOutput().size() + extraColumnsNum) {
throw new AnalysisException(" OLAP : insert into cols should be corresponding to the query output");
}

Expand Down Expand Up @@ -509,7 +509,7 @@ private Plan bindHiveTableSink(MatchingContext<UnboundHiveTableSink<Plan>> ctx)
Optional.empty(),
child);
// we need to insert all the columns of the target table
if (boundSink.getCols().size() >= child.getOutput().size()) {
if (boundSink.getCols().size() > child.getOutput().size()) {
throw new AnalysisException("HIVE : insert into cols should be corresponding to the query output");
}
Map<String, NamedExpression> columnToOutput = getColumnToOutput(ctx, table, false,
Expand Down Expand Up @@ -550,7 +550,7 @@ private Plan bindIcebergTableSink(MatchingContext<UnboundIcebergTableSink<Plan>>
Optional.empty(),
child);
// we need to insert all the columns of the target table
if (boundSink.getCols().size() >= child.getOutput().size()) {
if (boundSink.getCols().size() > child.getOutput().size()) {
throw new AnalysisException("ICE : insert into cols should be corresponding to the query output");
}
Map<String, NamedExpression> columnToOutput = getColumnToOutput(ctx, table, false,
Expand Down Expand Up @@ -591,7 +591,7 @@ private Plan bindJdbcTableSink(MatchingContext<UnboundJdbcTableSink<Plan>> ctx)
Optional.empty(),
child);
// we need to insert all the columns of the target table
if (boundSink.getCols().size() >= child.getOutput().size()) {
if (boundSink.getCols().size() > child.getOutput().size()) {
throw new AnalysisException("JDBC : insert into cols should be corresponding to the query output");
}
Map<String, NamedExpression> columnToOutput = getJdbcColumnToOutput(bindColumns, child);
Expand Down

0 comments on commit 61d5f30

Please sign in to comment.