mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
(improvement)(headless)Normalize space SQL strings in the log messages.
This commit is contained in:
@@ -33,7 +33,7 @@ public class DefaultQueryCache implements QueryCache {
|
||||
log.warn("exception:", exception);
|
||||
return null;
|
||||
});
|
||||
log.info("put to cache, key:{}", cacheKey);
|
||||
log.debug("put to cache, key: {}", cacheKey);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -12,8 +12,6 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
;
|
||||
|
||||
@Component("JdbcExecutor")
|
||||
@Slf4j
|
||||
public class JdbcExecutor implements QueryExecutor {
|
||||
@@ -40,7 +38,7 @@ public class JdbcExecutor implements QueryExecutor {
|
||||
log.warn("data base id is empty");
|
||||
return null;
|
||||
}
|
||||
log.info("query SQL: {}", queryStatement.getSql());
|
||||
log.info("executing SQL: {}", StringUtils.normalizeSpace(queryStatement.getSql()));
|
||||
Database database = queryStatement.getSemanticModel().getDatabase();
|
||||
SemanticQueryResp queryResultWithColumns = new SemanticQueryResp();
|
||||
SqlUtils sqlUtil = sqlUtils.init(database);
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.apache.calcite.sql.SqlNode;
|
||||
import org.apache.calcite.sql.fun.SqlStdOperatorTable;
|
||||
import org.apache.calcite.sql.parser.SqlParserPos;
|
||||
import org.apache.calcite.sql.validate.SqlValidatorScope;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -106,7 +107,7 @@ public class JoinRender extends Renderer {
|
||||
addZipperField(dataSource, dataSourceWhere);
|
||||
TableView tableView = SourceRender.renderOne("", dataSourceWhere, queryMetrics, queryDimension,
|
||||
metricCommand.getWhere(), dataSources.get(i), scope, schema, true);
|
||||
log.info("tableView {}", tableView.getTable().toString());
|
||||
log.info("tableView {}", StringUtils.normalizeSpace(tableView.getTable().toString()));
|
||||
String alias = Constants.JOIN_TABLE_PREFIX + dataSource.getName();
|
||||
tableView.setAlias(alias);
|
||||
tableView.setPrimary(primary);
|
||||
|
||||
Reference in New Issue
Block a user