[fix](Nereids) fix ShowProcedureStatusCommand sendResultSet (#35355)
This commit is contained in:
@ -25,6 +25,7 @@ import org.apache.doris.common.UserException;
|
||||
import org.apache.doris.datasource.InternalCatalog;
|
||||
import org.apache.doris.qe.ShowResultSetMetaData;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
// Show database statement.
|
||||
@ -95,7 +96,7 @@ public class ShowDbStmt extends ShowStmt {
|
||||
if (pattern != null) {
|
||||
sb.append(" LIKE '").append(pattern).append("'");
|
||||
}
|
||||
if (!InternalCatalog.INTERNAL_CATALOG_NAME.equals(catalogName)) {
|
||||
if (!Strings.isNullOrEmpty(catalogName) && !InternalCatalog.INTERNAL_CATALOG_NAME.equals(catalogName)) {
|
||||
sb.append(" FROM ").append(catalogName);
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
@ -65,10 +65,8 @@ public class ShowCreateProcedureCommand extends Command implements NoForward {
|
||||
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
|
||||
List<List<String>> results = new ArrayList<>();
|
||||
ctx.getPlSqlOperation().getExec().functions.showCreateProcedure(this.procedureName, results);
|
||||
if (!results.isEmpty()) {
|
||||
ShowResultSet commonResultSet = new ShowResultSet(getMetaData(), results);
|
||||
executor.sendResultSet(commonResultSet);
|
||||
}
|
||||
ShowResultSet commonResultSet = new ShowResultSet(getMetaData(), results);
|
||||
executor.sendResultSet(commonResultSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -63,10 +63,8 @@ public class ShowProcedureStatusCommand extends Command implements NoForward {
|
||||
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
|
||||
List<List<String>> results = new ArrayList<>();
|
||||
ctx.getPlSqlOperation().getExec().functions.showProcedure(results);
|
||||
if (!results.isEmpty()) {
|
||||
ShowResultSet commonResultSet = new ShowResultSet(getMetaData(), results);
|
||||
executor.sendResultSet(commonResultSet);
|
||||
}
|
||||
ShowResultSet commonResultSet = new ShowResultSet(getMetaData(), results);
|
||||
executor.sendResultSet(commonResultSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user