Skip to content

Commit

Permalink
error resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
kanha-gupta committed Oct 13, 2023
1 parent 7858a1e commit 9b42707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
import org.apache.shardingsphere.sqlfederation.compiler.converter.statement.SQLStatementConverter;

public final class MergeStatementConverter implements SQLStatementConverter<MergeStatement, SqlNode> {

@Override
public SqlNode convert(final MergeStatement mergeStatement) {
SqlNode targetTable = new TableConverter().convert(mergeStatement.getTarget()).orElseThrow(IllegalStateException::new);
SqlNode condition = new ExpressionConverter().convert(mergeStatement.getExpression().getExpr()).get();
SqlNode sourceTable = new TableConverter().convert(mergeStatement.getSource()).orElseThrow(IllegalStateException::new);
return new SqlMerge(SqlParserPos.ZERO, targetTable, condition, sourceTable, null, null, null, null);
return new SqlMerge(SqlParserPos.ZERO, targetTable, condition, sourceTable, null, null, null, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SQLNodeConverterEngineIT {
private static final String UPDATE_STATEMENT_PREFIX = "UPDATE";

private static final String INSERT_STATEMENT_PREFIX = "INSERT";

private static final String MERGE_STATEMENT_PREFIX = "MERGE";

@ParameterizedTest(name = "{0} ({1}) -> {2}")
Expand Down

0 comments on commit 9b42707

Please sign in to comment.