(fix)(headless)Fix demo conversations with DETAIL query mode.

(fix)(headless)Fix demo conversations with DETAIL query mode.
This commit is contained in:
jerryjzhang
2024-08-10 21:47:11 +08:00
parent 68952fdb55
commit b13b38c645
8 changed files with 25 additions and 17 deletions

View File

@@ -34,12 +34,13 @@ public class JdbcExecutor implements QueryExecutor {
}
SqlUtils sqlUtils = ContextUtils.getBean(SqlUtils.class);
log.info("executing SQL: {}", StringUtils.normalizeSpace(queryStatement.getSql()));
String sql = StringUtils.normalizeSpace(queryStatement.getSql());
log.info("executing SQL: {}", sql);
Database database = queryStatement.getSemanticModel().getDatabase();
SemanticQueryResp queryResultWithColumns = new SemanticQueryResp();
SqlUtils sqlUtil = sqlUtils.init(database);
sqlUtil.queryInternal(queryStatement.getSql(), queryResultWithColumns);
queryResultWithColumns.setSql(queryStatement.getSql());
queryResultWithColumns.setSql(sql);
return queryResultWithColumns;
}