Skip to content

More enhancements for query obfuscator#29672

Merged
alexey-milovidov merged 7 commits intomasterfrom
clickhouse-obfuscator-2
Oct 20, 2021
Merged

More enhancements for query obfuscator#29672
alexey-milovidov merged 7 commits intomasterfrom
clickhouse-obfuscator-2

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Query obfuscator clickhouse-format --obfuscate now works with more types of queries.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Oct 3, 2021
@mathalex mathalex self-assigned this Oct 7, 2021
if (has_sign || has_number)
/// 123+ or +123+, just stop after 123 or +123.
if (has_number)
return ReturnType(true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We return true but do not initialize x. Is it ok? So now several build checks fail due to possible uninitialized variable. Maybe we can just add x = 0; at the beginning or fix something in this part?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I expect that has_number is true iff at least one digit was read. Let me check...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right, the code is incorrect.

@alexey-milovidov alexey-milovidov marked this pull request as draft October 14, 2021 19:59
@alexey-milovidov alexey-milovidov marked this pull request as ready for review October 17, 2021 03:38
Copy link
Copy Markdown
Contributor

@mathalex mathalex left a comment

Choose a reason for hiding this comment

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

All failed tests are not related to this PR, as I can understand.

@alexey-milovidov alexey-milovidov merged commit d3df1c0 into master Oct 20, 2021
@alexey-milovidov alexey-milovidov deleted the clickhouse-obfuscator-2 branch October 20, 2021 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants