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

Cleanup sql comments when detecting type #2019

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

Paultagoras
Copy link
Contributor

Summary

We weren't removing SQL comments before, this way we clean up the line before trying to analyze type

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@Paultagoras Paultagoras self-assigned this Dec 13, 2024
}

trimmedSql = trimmedSql.replaceAll("/\\*.*?\\*/", "").trim(); // remove comments
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may be need to remember first comment to send it as log_comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can discuss if we should capture it, though I suspect... no?

@Paultagoras Paultagoras merged commit 36cad37 into main Dec 13, 2024
2 checks passed
@Paultagoras Paultagoras deleted the sql-comment-parsing branch December 13, 2024 17:36
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
47.6% Coverage on New Code (required ≥ 80%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants