Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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

Comments

@zhengyuan-cn
Copy link
Contributor

zhengyuan-cn commented Feb 27, 2023

Search before asking

  • 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(); }

SeaTunnel Version

2.3.0-release

SeaTunnel Config

ingore

Running Command

ingore

Error Exception

SQL syntax error

Flink or Spark Version

2.4.8

Java or Scala Version

1.8

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Hisoka-X
Copy link
Member

Hisoka-X commented Mar 4, 2023

Hi, still waiting your fix PR.😁

@zhengyuan-cn
Copy link
Contributor Author

I fixed commited code's bug , position by java regex

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Apr 16, 2023
zhengyuan-cn added a commit to zhengyuan-cn/seatunnel that referenced this issue May 25, 2023
…ex method, sql invalide when sql contains tz function cause by direct append QUERY_LIMIT apache#4231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants