-
Notifications
You must be signed in to change notification settings - Fork 7k
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
clickhouse client/local interactive: support \i file #38813
Conversation
return false; | ||
|
||
if (trimmed_input.starts_with("\\i")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But is it possible to group the code with others (backslash_aliases
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to do that at first, but switched to current way as backslash_aliases
just rewrite input text while for \i
need a different code for execution of queries so it seemed better to put this inside processQueryText
.
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT --disable_suggestion" | ||
expect ":) " | ||
|
||
send -- "\\i queries_02352\r" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add a case with \i queries_02352;
(semicolon is trimmed) as well as
\i a file with whitespace ;
(extra whitespaces in the beginning and at the end trimmed, other preserved)
porting ClickHouse/ClickHouse#38813 (Jul 4, 2022)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Support
\i file
in clickhouse client / local (similar to psql \i).