You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] connector-influxdb module InfluxDBSource class's initColumnsIndex method, sql invalide when sql contains tz function cause by direct append QUERY_LIMIT
#4231
Open
3 tasks done
zhengyuan-cn opened this issue
Feb 27, 2023
· 3 comments
I had searched in the issues and found no similar issues.
What happened
connector-influxdb module InfluxDBSource class's initColumnsIndex method, sql invalide when sql contains tz function cause by direct append QUERY_LIMIT
fix code: String sql = sourceConfig.getSql(); String query = sql + QUERY_LIMIT; // if sql contains tz(), can't be append QUERY_LIMIT at last . see bug #4231 if (sql.toLowerCase().contains("tz")) { int start = sql.toLowerCase().indexOf("tz"); StringBuilder tmpSql = new StringBuilder(sql); tmpSql.insert(start-1, QUERY_LIMIT+" "); query = tmpSql.toString(); }
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
Search before asking
What happened
connector-influxdb module InfluxDBSource class's initColumnsIndex method, sql invalide when sql contains tz function cause by direct append QUERY_LIMIT
fix code:
String sql = sourceConfig.getSql(); String query = sql + QUERY_LIMIT; // if sql contains tz(), can't be append QUERY_LIMIT at last . see bug #4231 if (sql.toLowerCase().contains("tz")) { int start = sql.toLowerCase().indexOf("tz"); StringBuilder tmpSql = new StringBuilder(sql); tmpSql.insert(start-1, QUERY_LIMIT+" "); query = tmpSql.toString(); }
SeaTunnel Version
2.3.0-release
SeaTunnel Config
Running Command
Error Exception
Flink or Spark Version
2.4.8
Java or Scala Version
1.8
Screenshots
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: