You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,25 +42,25 @@ At a minimum, the following information should be added (but add more as needed)
42
42
> Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/
43
43
44
44
<details>
45
-
<summary>Modify your CI run</summary>
45
+
<summary>CI Settings</summary>
46
46
47
47
**NOTE:** If your merge the PR with modified CI you **MUST KNOW** what you are doing
48
48
**NOTE:** Checked options will be applied if set before CI RunConfig/PrepareRunConfig step
49
49
50
-
#### Include tests (required builds will be added automatically):
51
-
-[ ]<!---ci_include_fast--> Fast test
50
+
#### Run these jobs only (required builds will be added automatically):
Copy file name to clipboardExpand all lines: docs/en/interfaces/formats.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,7 @@ SELECT * FROM nestedt FORMAT TSV
197
197
-[input_format_tsv_enum_as_number](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_enum_as_number) - treat inserted enum values in TSV formats as enum indices. Default value - `false`.
198
198
-[input_format_tsv_use_best_effort_in_schema_inference](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_use_best_effort_in_schema_inference) - use some tweaks and heuristics to infer schema in TSV format. If disabled, all fields will be inferred as Strings. Default value - `true`.
199
199
-[output_format_tsv_crlf_end_of_line](/docs/en/operations/settings/settings-formats.md/#output_format_tsv_crlf_end_of_line) - if it is set true, end of line in TSV output format will be `\r\n` instead of `\n`. Default value - `false`.
200
+
-[input_format_tsv_crlf_end_of_line](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_crlf_end_of_line) - if it is set true, end of line in TSV input format will be `\r\n` instead of `\n`. Default value - `false`.
200
201
-[input_format_tsv_skip_first_lines](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_skip_first_lines) - skip specified number of lines at the beginning of data. Default value - `0`.
201
202
-[input_format_tsv_detect_header](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_detect_header) - automatically detect header with names and types in TSV format. Default value - `true`.
202
203
-[input_format_tsv_skip_trailing_empty_lines](/docs/en/operations/settings/settings-formats.md/#input_format_tsv_skip_trailing_empty_lines) - skip trailing empty lines at the end of data. Default value - `false`.
-`successes_x`: Number of successes in population `x`. [UInt64](../data-types/int-uint.md).
964
+
-`successes_y`: Number of successes in population `y`. [UInt64](../data-types/int-uint.md).
965
+
-`trials_x`: Number of trials in population `x`. [UInt64](../data-types/int-uint.md).
966
+
-`trials_y`: Number of trials in population `y`. [UInt64](../data-types/int-uint.md).
967
+
-`conf_level`: Confidence level for the test. [Float64](../data-types/float.md).
968
+
-`pool_type`: Selection of pooling (way in which the standard error is estimated). Can be either `unpooled` or `pooled`. [String](../data-types/string.md).
969
+
970
+
:::note
971
+
For argument `pool_type`: In the pooled version, the two proportions are averaged, and only one proportion is used to estimate the standard error. In the unpooled version, the two proportions are used separately.
972
+
:::
973
+
974
+
**Returned value**
975
+
976
+
-`z_stat`: Z statistic. [Float64](../data-types/float.md).
977
+
-`p_val`: P value. [Float64](../data-types/float.md).
978
+
-`ci_low`: The lower confidence interval. [Float64](../data-types/float.md).
979
+
-`ci_high`: The upper confidence interval. [Float64](../data-types/float.md).
Copy file name to clipboardExpand all lines: docs/en/sql-reference/functions/other-functions.md
+159-6Lines changed: 159 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -998,17 +998,170 @@ SELECT version()
998
998
Returns the build ID generated by a compiler for the running ClickHouse server binary.
999
999
If executed in the context of a distributed table, this function generates a normal column with values relevant to each shard. Otherwise it produces a constant value.
1000
1000
1001
-
## blockNumber()
1001
+
## blockNumber
1002
1002
1003
-
Returns the sequence number of the data block where the row is located.
1003
+
Returns a monotonically increasing sequence number of the [block](../../development/architecture.md#block) containing the row.
1004
+
The returned block number is updated on a best-effort basis, i.e. it may not be fully accurate.
1004
1005
1005
-
## rowNumberInBlock() {#rowNumberInBlock}
1006
+
**Syntax**
1007
+
1008
+
```sql
1009
+
blockNumber()
1010
+
```
1011
+
1012
+
**Returned value**
1013
+
1014
+
- Sequence number of the data block where the row is located. [UInt64](../data-types/int-uint.md).
1015
+
1016
+
**Example**
1017
+
1018
+
Query:
1019
+
1020
+
```sql
1021
+
SELECT blockNumber()
1022
+
FROM
1023
+
(
1024
+
SELECT*
1025
+
FROMsystem.numbers
1026
+
LIMIT10
1027
+
) SETTINGS max_block_size =2
1028
+
```
1029
+
1030
+
Result:
1031
+
1032
+
```response
1033
+
┌─blockNumber()─┐
1034
+
│ 7 │
1035
+
│ 7 │
1036
+
└───────────────┘
1037
+
┌─blockNumber()─┐
1038
+
│ 8 │
1039
+
│ 8 │
1040
+
└───────────────┘
1041
+
┌─blockNumber()─┐
1042
+
│ 9 │
1043
+
│ 9 │
1044
+
└───────────────┘
1045
+
┌─blockNumber()─┐
1046
+
│ 10 │
1047
+
│ 10 │
1048
+
└───────────────┘
1049
+
┌─blockNumber()─┐
1050
+
│ 11 │
1051
+
│ 11 │
1052
+
└───────────────┘
1053
+
```
1054
+
1055
+
## rowNumberInBlock {#rowNumberInBlock}
1056
+
1057
+
Returns for each [block](../../development/architecture.md#block) processed by `rowNumberInBlock` the number of the current row.
1058
+
The returned number starts for each block at 0.
1059
+
1060
+
**Syntax**
1061
+
1062
+
```sql
1063
+
rowNumberInBlock()
1064
+
```
1065
+
1066
+
**Returned value**
1067
+
1068
+
- Ordinal number of the row in the data block starting from 0. [UInt64](../data-types/int-uint.md).
1069
+
1070
+
**Example**
1071
+
1072
+
Query:
1073
+
1074
+
```sql
1075
+
SELECT rowNumberInBlock()
1076
+
FROM
1077
+
(
1078
+
SELECT*
1079
+
FROMsystem.numbers_mt
1080
+
LIMIT10
1081
+
) SETTINGS max_block_size =2
1082
+
```
1083
+
1084
+
Result:
1085
+
1086
+
```response
1087
+
┌─rowNumberInBlock()─┐
1088
+
│ 0 │
1089
+
│ 1 │
1090
+
└────────────────────┘
1091
+
┌─rowNumberInBlock()─┐
1092
+
│ 0 │
1093
+
│ 1 │
1094
+
└────────────────────┘
1095
+
┌─rowNumberInBlock()─┐
1096
+
│ 0 │
1097
+
│ 1 │
1098
+
└────────────────────┘
1099
+
┌─rowNumberInBlock()─┐
1100
+
│ 0 │
1101
+
│ 1 │
1102
+
└────────────────────┘
1103
+
┌─rowNumberInBlock()─┐
1104
+
│ 0 │
1105
+
│ 1 │
1106
+
└────────────────────┘
1107
+
```
1108
+
1109
+
## rowNumberInAllBlocks
1110
+
1111
+
Returns a unique row number for each row processed by `rowNumberInAllBlocks`. The returned numbers start at 0.
1112
+
1113
+
**Syntax**
1114
+
1115
+
```sql
1116
+
rowNumberInAllBlocks()
1117
+
```
1118
+
1119
+
**Returned value**
1120
+
1121
+
- Ordinal number of the row in the data block starting from 0. [UInt64](../data-types/int-uint.md).
1122
+
1123
+
**Example**
1124
+
1125
+
Query:
1126
+
1127
+
```sql
1128
+
SELECT rowNumberInAllBlocks()
1129
+
FROM
1130
+
(
1131
+
SELECT*
1132
+
FROMsystem.numbers_mt
1133
+
LIMIT10
1134
+
)
1135
+
SETTINGS max_block_size =2
1136
+
```
1137
+
1138
+
Result:
1139
+
1140
+
```response
1141
+
┌─rowNumberInAllBlocks()─┐
1142
+
│ 0 │
1143
+
│ 1 │
1144
+
└────────────────────────┘
1145
+
┌─rowNumberInAllBlocks()─┐
1146
+
│ 4 │
1147
+
│ 5 │
1148
+
└────────────────────────┘
1149
+
┌─rowNumberInAllBlocks()─┐
1150
+
│ 2 │
1151
+
│ 3 │
1152
+
└────────────────────────┘
1153
+
┌─rowNumberInAllBlocks()─┐
1154
+
│ 6 │
1155
+
│ 7 │
1156
+
└────────────────────────┘
1157
+
┌─rowNumberInAllBlocks()─┐
1158
+
│ 8 │
1159
+
│ 9 │
1160
+
└────────────────────────┘
1161
+
```
1006
1162
1007
-
Returns the ordinal number of the row in the data block. Different data blocks are always recalculated.
1008
1163
1009
-
## rowNumberInAllBlocks()
1010
1164
1011
-
Returns the ordinal number of the row in the data block. This function only considers the affected data blocks.
0 commit comments