提交 d77bb276 编写于 作者: I Ivan Blinkov

Merge branch 'master' of github.com:yandex/ClickHouse

......@@ -172,6 +172,7 @@ static DataTypePtr create(const ASTPtr & arguments)
void registerDataTypeDateTime(DataTypeFactory & factory)
{
factory.registerDataType("DateTime", create, DataTypeFactory::CaseInsensitive);
factory.registerAlias("TIMESTAMP", "DateTime", DataTypeFactory::CaseInsensitive);
}
......
......@@ -6,6 +6,7 @@ hello
hello
hello
hello
1970-01-01 00:00:01
CREATE TABLE test.cast ( x UInt8, e Enum8('hello' = 1, 'world' = 2) DEFAULT CAST(x, 'Enum8(\'hello\' = 1, \'world\' = 2)')) ENGINE = MergeTree ORDER BY e SETTINGS index_granularity = 8192
x UInt8
e Enum8(\'hello\' = 1, \'world\' = 2) DEFAULT CAST(x, \'Enum8(\\\'hello\\\' = 1, \\\'world\\\' = 2)\')
......
......@@ -15,6 +15,8 @@ SELECT cast(1 AS Enum8(
SELECT CAST(1, 'Enum8(\'hello\' = 1,\n\t\'world\' = 2)');
SELECT cast(1, 'Enum8(\'hello\' = 1,\n\t\'world\' = 2)');
SELECT toTimeZone(CAST(1 AS TIMESTAMP), 'UTC');
DROP TABLE IF EXISTS test.cast;
CREATE TABLE test.cast
(
......
......@@ -39,4 +39,4 @@ ENV CLICKHOUSE_CONFIG /etc/clickhouse-server/config.xml
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/clickhouse-server", "--config=${CLICKHOUSE_CONFIG}"]
CMD /usr/bin/clickhouse-server --config=${CLICKHOUSE_CONFIG}
\ No newline at end of file
nav:
- 'Introduction':
- '介绍':
- 'Overview': 'index.md'
- 'Distinctive features of ClickHouse': 'introduction/distinctive_features.md'
- 'ClickHouse features that can be considered disadvantages': 'introduction/features_considered_disadvantages.md'
- 'Performance': 'introduction/performance.md'
- 'The Yandex.Metrica task': 'introduction/ya_metrika_task.md'
- 'Getting started':
- 'Deploying and running': 'getting_started/index.md'
- 'Example datasets':
- '起步':
- '部署运行': 'getting_started/index.md'
- '示例数据集':
- 'OnTime': 'getting_started/example_datasets/ontime.md'
- 'New York Taxi data': 'getting_started/example_datasets/nyc_taxi.md'
- 'AMPLab Big Data Benchmark': 'getting_started/example_datasets/amplab_benchmark.md'
......@@ -17,17 +17,17 @@ nav:
- 'Terabyte click logs from Criteo': 'getting_started/example_datasets/criteo.md'
- 'Star Schema Benchmark': 'getting_started/example_datasets/star_schema.md'
- 'Interfaces':
- 'Introduction': 'interfaces/index.md'
- 'Command-line client': 'interfaces/cli.md'
- 'HTTP interface': 'interfaces/http_interface.md'
- 'JDBC driver': 'interfaces/jdbc.md'
- 'Native interface (TCP)': 'interfaces/tcp.md'
- 'Libraries from third-party developers': 'interfaces/third-party_client_libraries.md'
- 'Visual interfaces from third-party developers': 'interfaces/third-party_gui.md'
- 'Input and output formats': 'interfaces/formats.md'
- '客户端':
- '介绍': 'interfaces/index.md'
- '命令行客户端接口': 'interfaces/cli.md'
- 'HTTP 客户端接口': 'interfaces/http_interface.md'
- 'JDBC 驱动': 'interfaces/jdbc.md'
- '原生客户端接口 (TCP)': 'interfaces/tcp.md'
- '第三方开发的库': 'interfaces/third-party_client_libraries.md'
- '第三方开发的可视化界面': 'interfaces/third-party_gui.md'
- '输入输出格式': 'interfaces/formats.md'
- 'Data types':
- '数据类型':
- 'Introduction': 'data_types/index.md'
- 'UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64': 'data_types/int_uint.md'
- 'Float32, Float64': 'data_types/float.md'
......@@ -51,7 +51,7 @@ nav:
- 'Set': 'data_types/special_data_types/set.md'
- 'Nothing': 'data_types/special_data_types/nothing.md'
- 'SQL reference':
- 'SQL 语法':
- 'hidden': 'query_language/index.md'
- 'SELECT': 'query_language/select.md'
- 'INSERT INTO': 'query_language/insert_into.md'
......@@ -113,7 +113,7 @@ nav:
- 'Operators': 'query_language/operators.md'
- 'General syntax': 'query_language/syntax.md'
- 'Operations':
- '运维':
- 'hidden': 'operations/index.md'
- 'Table engines':
- 'Introduction': 'operations/table_engines/index.md'
......@@ -165,10 +165,10 @@ nav:
- 'clickhouse-copier': 'operations/utils/clickhouse-copier.md'
- 'clickhouse-local': 'operations/utils/clickhouse-local.md'
- 'F.A.Q.':
- '常见问题':
- 'General questions': 'faq/general.md'
- 'Development':
- '开发':
- 'hidden': 'development/index.md'
- 'Overview of ClickHouse architecture': 'development/architecture.md'
- 'How to build ClickHouse on Linux': 'development/build.md'
......@@ -176,7 +176,7 @@ nav:
- 'How to write C++ code': 'development/style.md'
- 'How to run ClickHouse tests': 'development/tests.md'
- 'What''s new':
- '新功能特性':
- 'Roadmap': 'roadmap.md'
- 'Changelog': 'changelog.md'
- 'Security changelog': 'security_changelog.md'
......@@ -37,6 +37,11 @@ def autoremoved_file(path):
os.unlink(path)
def select_css_lang(lang):
if lang == 'zh':
return ['assets/stylesheets/custom_zh.css']
return ['assets/stylesheets/custom.css']
def build_for_lang(lang, args):
logging.info('Building %s docs' % lang)
......@@ -87,7 +92,7 @@ def build_for_lang(lang, args):
repo_name='yandex/ClickHouse',
repo_url='https://github.com/yandex/ClickHouse/',
edit_uri='edit/master/docs/%s' % lang,
extra_css=['assets/stylesheets/custom.css'],
extra_css=select_css_lang(lang),
markdown_extensions=[
'admonition',
'attr_list',
......
@font-face {
font-family: 'Yandex Sans Text Web';
src: url(https://yastatic.net/adv-www/_/yy5JveR58JFkc97waf-xp0i6_jM.eot);
src: url(https://yastatic.net/adv-www/_/yy5JveR58JFkc97waf-xp0i6_jM.eot?#iefix) format('embedded-opentype'),
url(https://yastatic.net/adv-www/_/CYblzLEXzCqQIvrYs7QKQe2omRk.woff2) format('woff2'),
url(https://yastatic.net/adv-www/_/pUcnOdRwl83MvPPzrNomhyletnA.woff) format('woff'),
url(https://yastatic.net/adv-www/_/vNFEmXOcGYKJ4AAidUprHWoXrLU.ttf) format('truetype'),
url(https://yastatic.net/adv-www/_/0w7OcWZM_QLP8x-LQUXFOgXO6dE.svg#YandexSansTextWeb-Bold) format('svg');
font-weight: 700;
font-style: normal;
font-stretch: normal
}
@font-face {
font-family: 'Yandex Sans Text Web';
src: url(https://yastatic.net/adv-www/_/LI6l3L2RqcgxBe2pXmuUha37czQ.eot);
src: url(https://yastatic.net/adv-www/_/LI6l3L2RqcgxBe2pXmuUha37czQ.eot?#iefix) format('embedded-opentype'),
url(https://yastatic.net/adv-www/_/z3MYElcut0R2MF_Iw1RDNrstgYs.woff2) format('woff2'),
url(https://yastatic.net/adv-www/_/1jvKJ_-hCXl3s7gmFl-y_-UHTaI.woff) format('woff'),
url(https://yastatic.net/adv-www/_/9nzjfpCR2QHvK1EzHpDEIoVFGuY.ttf) format('truetype'),
url(https://yastatic.net/adv-www/_/gwyBTpxSwkFCF1looxqs6JokKls.svg#YandexSansTextWeb-Regular) format('svg');
font-weight: 400;
font-style: normal;
font-stretch: normal
}
@font-face {
font-family: 'Yandex Sans Text Web';
src: url(https://yastatic.net/adv-www/_/ayAFYoY8swgBLhq_I56tKj2JftU.eot);
src: url(https://yastatic.net/adv-www/_/ayAFYoY8swgBLhq_I56tKj2JftU.eot?#iefix) format('embedded-opentype'),
url(https://yastatic.net/adv-www/_/lGQcYklLVV0hyvz1HFmFsUTj8_0.woff2) format('woff2'),
url(https://yastatic.net/adv-www/_/f0AAJ9GJ4iiwEmhG-7PWMHk6vUY.woff) format('woff'),
url(https://yastatic.net/adv-www/_/4UDe4nlVvgEJ-VmLWNVq3SxCsA.ttf) format('truetype'),
url(https://yastatic.net/adv-www/_/EKLr1STNokPqxLAQa_RyN82pL98.svg#YandexSansTextWeb-Light) format('svg');
font-weight: 300;
font-style: normal;
font-stretch: normal
}
@font-face {
font-family: 'Yandex Sans Display Web';
src: url(https://yastatic.net/adv-www/_/H63jN0veW07XQUIA2317lr9UIm8.eot);
src: url(https://yastatic.net/adv-www/_/H63jN0veW07XQUIA2317lr9UIm8.eot?#iefix) format('embedded-opentype'),
url(https://yastatic.net/adv-www/_/sUYVCPUAQE7ExrvMS7FoISoO83s.woff2) format('woff2'),
url(https://yastatic.net/adv-www/_/v2Sve_obH3rKm6rKrtSQpf-eB7U.woff) format('woff'),
url(https://yastatic.net/adv-www/_/PzD8hWLMunow5i3RfJ6WQJAL7aI.ttf) format('truetype'),
url(https://yastatic.net/adv-www/_/lF_KG5g4tpQNlYIgA0e77fBSZ5s.svg#YandexSansDisplayWeb-Regular) format('svg');
font-weight: 400;
font-style: normal;
font-stretch: normal
}
@font-face {
font-family: 'Yandex Sans Display Web';
src: url(https://yastatic.net/adv-www/_/g8_MyyKVquSZ3xEL6tarK__V9Vw.eot);
src: url(https://yastatic.net/adv-www/_/g8_MyyKVquSZ3xEL6tarK__V9Vw.eot?#iefix) format('embedded-opentype'),
url(https://yastatic.net/adv-www/_/LGiRvlfqQHlWR9YKLhsw5e7KGNA.woff2) format('woff2'),
url(https://yastatic.net/adv-www/_/40vXwNl4eYYMgteIVgLP49dwmfc.woff) format('woff'),
url(https://yastatic.net/adv-www/_/X6zG5x_wO8-AtwJ-vDLJcKC5228.ttf) format('truetype'),
url(https://yastatic.net/adv-www/_/ZKhaR0m08c8CRRL77GtFKoHcLYA.svg#YandexSansDisplayWeb-Light) format('svg');
font-weight: 300;
font-style: normal;
font-stretch: normal
}
body {
font-family: Lato,-apple-system,BlinkMacSystemFont,Helvetica,"Segoe UI","Hiragino Sans GB","Noto Sans CJK SC",Arial,Ubuntu,sans-serif,"Apple Color Emoji";
}
a:link, a:visited {
color: #08f;
text-decoration: none;
}
.md-nav__link {
color: #000 !important;
}
.md-nav__link[data-md-state='blur'] {
color: #888 !important;
}
.md-nav__link:hover, .md-nav__link:active {
color: #08f !important;
text-decoration: none;
}
a:hover, a:active {
color: #f00;
text-decoration: underline;
}
.md-typeset pre {
font: 13px/18px monospace, "Courier New";
display: block;
padding: 1rem 3rem 1rem 1rem;
overflow: scroll;
}
h1, h2, h3, .md-logo {
font-family: Lato,-apple-system,BlinkMacSystemFont,Helvetica,"Segoe UI","Hiragino Sans GB","Noto Sans CJK SC",Arial,Ubuntu,sans-serif,"Apple Color Emoji";
color: #000 !important;
}
.md-logo {
padding: 0;
}
.md-header {
border-bottom: 1px solid #efefef;
}
.md-header-nav__title {
font-size: 3rem;
font-family: Lato,-apple-system,BlinkMacSystemFont,Helvetica,"Segoe UI","Hiragino Sans GB","Noto Sans CJK SC",Arial,Ubuntu,sans-serif,"Apple Color Emoji";
}
.md-content__icon:hover {
text-decoration: none !important;
color: #08f !important;
}
.md-content{
-webkit-text-size-adjust: 100%;
line-height: 1.5;
color: #24292e;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
word-wrap: break-word;
}
.md-search-result__link {
text-decoration: none !important;
}
.md-hide {
display: none;
}
#md-extra-nav {
background: #efefef;
padding: 0.5rem 0;
}
.grey {
color: #666;
}
.md-alt-lang:hover {
text-decoration: none;
}
.md-alt-lang>svg {
width: 36px;
height: 24px;
margin: 1.3rem 0;
filter: brightness(96%) grayscale(90%);
}
.md-alt-lang:hover>svg {
filter: brightness(96%) grayscale(5%);
}
.md-current-lang>svg {
filter: brightness(96%) grayscale(0%) !important;
}
@media only screen and (min-width: 60em) {
#md-sidebar-flags {
display: none;
}
}
../../en/interfaces/formats.md
\ No newline at end of file
此差异已折叠。
# HTTP 接口
# HTTP 客户端
HTTP 接口可以让你通过任何平台和编程语言来使用 ClickHouse。我们用 Java 和 Perl 以及 shell 脚本来访问它。在其他的部门中,HTTP 接口会用在 Perl,Python 以及 Go 中。HTTP 接口比 TCP 原生接口更为局限,但是却有更好的兼容性。
......
<a name="interfaces"></a>
# 接口
# 客户端
为了探索 ClickHouse 的能力,如导入数据到表中,或做一些手动的查询,可以使用 clickhouse-client 命令行程序来完成
......
# 原生接口(TCP)
# 原生客户端接口(TCP)
TCP 原生接口用于 `clickhouse-client` 命令行,它可以在分布式查询执行中和服务器进行交互,并且可以用在 C++ 程序中。我们讲解只覆盖命令行客户端。
......@@ -28,7 +28,6 @@ ClickHouse Web 界面 [Tabix](https://github.com/tabixio/tabix).
- 快速查看列占用的空间。
- 服务配置。
The following features are planned for development:
以下功能正在计划开发:
- 数据库管理
- 用户管理
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册