use of org.apache.flink.sql.parser.dml.RichSqlInsert in project flink by apache.
the class SqlToOperationConverter method convertRichExplain.
/**
* Convert RICH EXPLAIN statement.
*/
private Operation convertRichExplain(SqlRichExplain sqlExplain) {
SqlNode sqlNode = sqlExplain.getStatement();
Operation operation;
if (sqlNode instanceof RichSqlInsert) {
operation = convertSqlInsert((RichSqlInsert) sqlNode);
} else if (sqlNode instanceof SqlStatementSet) {
operation = convertSqlStatementSet((SqlStatementSet) sqlNode);
} else if (sqlNode.getKind().belongsTo(SqlKind.QUERY)) {
operation = convertSqlQuery(sqlExplain.getStatement());
} else {
throw new ValidationException(String.format("EXPLAIN statement doesn't support %s", sqlNode.getKind()));
}
return new ExplainOperation(operation, sqlExplain.getExplainDetails());
}
Aggregations