mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
Merge branch 'master' into enable-output_format_pretty_row_numbers
This commit is contained in:
commit
df8a6b8d0c
@ -405,7 +405,7 @@ Returns the name of the current user. In case of a distributed query, the name o
|
|||||||
SELECT currentUser();
|
SELECT currentUser();
|
||||||
```
|
```
|
||||||
|
|
||||||
Alias: `user()`, `USER()`.
|
Aliases: `user()`, `USER()`, `current_user()`. Aliases are case insensitive.
|
||||||
|
|
||||||
**Returned values**
|
**Returned values**
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ REGISTER_FUNCTION(CurrentUser)
|
|||||||
{
|
{
|
||||||
factory.registerFunction<FunctionCurrentUser>();
|
factory.registerFunction<FunctionCurrentUser>();
|
||||||
factory.registerAlias("user", FunctionCurrentUser::name, FunctionFactory::CaseInsensitive);
|
factory.registerAlias("user", FunctionCurrentUser::name, FunctionFactory::CaseInsensitive);
|
||||||
|
factory.registerAlias("current_user", FunctionCurrentUser::name, FunctionFactory::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -216,11 +216,14 @@ def gen_tags(version: ClickHouseVersion, release_type: str) -> List[str]:
|
|||||||
return tags
|
return tags
|
||||||
|
|
||||||
|
|
||||||
def buildx_args(urls: Dict[str, str], arch: str, direct_urls: List[str]) -> List[str]:
|
def buildx_args(
|
||||||
|
urls: Dict[str, str], arch: str, direct_urls: List[str], version: str
|
||||||
|
) -> List[str]:
|
||||||
args = [
|
args = [
|
||||||
f"--platform=linux/{arch}",
|
f"--platform=linux/{arch}",
|
||||||
f"--label=build-url={GITHUB_RUN_URL}",
|
f"--label=build-url={GITHUB_RUN_URL}",
|
||||||
f"--label=com.clickhouse.build.githash={git.sha}",
|
f"--label=com.clickhouse.build.githash={git.sha}",
|
||||||
|
f"--label=com.clickhouse.build.version={version}",
|
||||||
]
|
]
|
||||||
if direct_urls:
|
if direct_urls:
|
||||||
args.append(f"--build-arg=DIRECT_DOWNLOAD_URLS='{' '.join(direct_urls)}'")
|
args.append(f"--build-arg=DIRECT_DOWNLOAD_URLS='{' '.join(direct_urls)}'")
|
||||||
@ -267,7 +270,9 @@ def build_and_push_image(
|
|||||||
urls = [url for url in direct_urls[arch] if ".deb" in url]
|
urls = [url for url in direct_urls[arch] if ".deb" in url]
|
||||||
else:
|
else:
|
||||||
urls = [url for url in direct_urls[arch] if ".tgz" in url]
|
urls = [url for url in direct_urls[arch] if ".tgz" in url]
|
||||||
cmd_args.extend(buildx_args(repo_urls, arch, direct_urls=urls))
|
cmd_args.extend(
|
||||||
|
buildx_args(repo_urls, arch, direct_urls=urls, version=version.describe)
|
||||||
|
)
|
||||||
if not push:
|
if not push:
|
||||||
cmd_args.append(f"--tag={image.repo}:{arch_tag}")
|
cmd_args.append(f"--tag={image.repo}:{arch_tag}")
|
||||||
cmd_args.extend(
|
cmd_args.extend(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
1
|
1
|
||||||
1
|
1
|
||||||
1 1
|
1 1 1
|
||||||
1
|
1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- since actual user name is unknown, have to perform just smoke tests
|
-- Since the actual user name is unknown, have to perform just smoke tests
|
||||||
select currentUser() IS NOT NULL;
|
select currentUser() IS NOT NULL;
|
||||||
select length(currentUser()) > 0;
|
select length(currentUser()) > 0;
|
||||||
select currentUser() = user(), currentUser() = USER();
|
select currentUser() = user(), currentUser() = USER(), current_user() = currentUser();
|
||||||
select currentUser() = initial_user from system.processes where query like '%$!@#%';
|
select currentUser() = initial_user from system.processes where query like '%$!@#%' AND current_database = currentDatabase();
|
||||||
|
Loading…
Reference in New Issue
Block a user