[improvement][headless]Support dataSetNames that contain dash.
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

[improvement][headless]Support dataSetNames that contain dash.

[improvement][headless]Support dataSetNames that contain dash.
This commit is contained in:
jerryjzhang
2025-02-21 01:11:58 +08:00
parent 5fa3607874
commit 94e853f57e
7 changed files with 43 additions and 15 deletions

View File

@@ -38,6 +38,10 @@ public class SqlReplaceHelper {
private final static double replaceColumnThreshold = 0.4;
public static String escapeTableName(String table) {
return String.format("`%s`", table);
}
public static String replaceAggFields(String sql,
Map<String, Pair<String, String>> fieldNameToAggMap) {
Select selectStatement = SqlSelectHelper.getSelect(sql);

View File

@@ -228,7 +228,7 @@ public class SqlSelectHelper {
statement = CCJSqlParserUtil.parse(sql);
} catch (JSQLParserException e) {
log.error("parse error, sql:{}", sql, e);
return null;
throw new RuntimeException(e);
}
if (statement instanceof ParenthesedSelect) {