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

Remind properly if use clickhouse-client --file without preceeding --external #34765

Merged

Conversation

taiyang-li
Copy link
Contributor

@taiyang-li taiyang-li commented Feb 20, 2022

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Remind properly if use clickhouse-client --file without preceeding --external. Close #34747

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Feb 20, 2022
@kitaisreal kitaisreal self-assigned this Feb 20, 2022
@kitaisreal
Copy link
Collaborator

@taiyang-li need to fix fast test.

@taiyang-li
Copy link
Contributor Author

I will fix them soon.

@taiyang-li
Copy link
Contributor Author

clickhouse-client will remind like this:

$ ./build_gcc/programs/clickhouse client   --file  -  
Code: 36. DB::Exception: Parameter must be in external group, try add --external before --file. (BAD_ARGUMENTS)

@taiyang-li
Copy link
Contributor Author

@taiyang-li need to fix fast test.

Done @kitaisreal

@taiyang-li
Copy link
Contributor Author

Failed integration tests irrelavent with clickhouse-client

@taiyang-li
Copy link
Contributor Author

@kitaisreal All checks have passed.

@@ -1234,6 +1236,160 @@ void Client::processConfig()
client_info.quota_key = config().getString("quota_key", "");
}

void Client::readArguments(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@taiyang-li could you please explain, why we extracted this method as ClientBase abstraction ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kitaisreal Only in clickhouse-client we need to distinguish whether an option is in external group or not, because options_description.external_description is not empty. But in clickhouse-local, we don't have to consider it. So implmentation for clickhouse-client and clickhouse-local seperately is necessary.

For example, options like --file, --structure in clickhouse-client is in external group, but not the same in clickhouse-local

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kitaisreal do you think it is ok ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, totally ok.

@taiyang-li
Copy link
Contributor Author

@kitaisreal Do you think this pr could be merged? Pls let me know if there are any other issues

@taiyang-li
Copy link
Contributor Author

@kitaisreal Waiting for you reply, thanks!

Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

The code LGTM.

@alexey-milovidov alexey-milovidov self-assigned this May 7, 2022
@alexey-milovidov alexey-milovidov mentioned this pull request May 7, 2022
alexey-milovidov added a commit that referenced this pull request May 7, 2022
@alexey-milovidov alexey-milovidov merged commit 1bdc51a into ClickHouse:master May 7, 2022
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.

Confusing message on a cli client flag misuse.
4 participants