mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
[improvement][headless]Support dataSetNames that contain dash.
[improvement][headless]Support dataSetNames that contain dash. [improvement][headless]Support dataSetNames that contain dash.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user