Commit Graph

1324 Commits

Author SHA1 Message Date
bharatnc
5c83b09a2f disallow CODEC setting for column type ALIAS
This commit adds checks in place during table creation
and updates to ensure that we don't allow `CODEC` for
ALIAS (`default_type` column) like:

```sql
CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1;
```

After these safeguards in place, when trying to create/update column
codec, we will get excaptions like this:

```sql

-- create

CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.006 sec.

-- modify

ALTER TABLE compression_codec_on_alias
    ADD COLUMN `c3` ALIAS c2 CODEC(ZSTD) AFTER c2

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.005 sec.

```
2020-08-30 23:45:53 -07:00
alexey-milovidov
b1efc5df01
Merge pull request #14225 from amosbird/bf1
Fix bug in mark inclusion search.
2020-08-30 02:58:22 +03:00
alesapin
2d33a4029b
Merge pull request #14220 from ClickHouse/remove_redundant_flag
Disable force TTL on optimize final
2020-08-29 10:40:36 +03:00
Amos Bird
591a4d60d4
Fix bug in mark inclusion search. 2020-08-29 09:46:46 +08:00
alesapin
10c7a6c45e
Add ability to specify Default codec for columns (#14049)
* Add ability to specify DefaultCompression codec which correspond to settings specified in config.xml

* Fix style

* Rename DefaultCompression to simple Default

* Fix compression codec

* Better codec description representation

* Less strange code and one method

* Fix delta
2020-08-28 20:40:45 +03:00
alesapin
65c33f0802
Merge pull request #13280 from amosbird/as
ALTER MODIFY SAMPLE BY
2020-08-28 19:32:09 +03:00
alesapin
232c264d7d Disable force TTL on optimise 2020-08-28 16:45:42 +03:00
alesapin
0896b49533 Small fixes 2020-08-28 13:18:56 +03:00
Amos Bird
078b14610d
ALTER MODIFY SAMPLE BY 2020-08-27 22:31:30 +08:00
alexey-milovidov
ea0122de7e
Merge pull request #14120 from ClickHouse/parallel-insert-more-storages
Support parallel INSERT for more table engines
2020-08-27 15:08:56 +03:00
alexey-milovidov
9baa0fbf81
Merge pull request #14129 from CurtizJ/fix-performance
Slightly optimize very short queries with LowCardinality
2020-08-27 15:07:19 +03:00
bharatnc
ffb73adb11 fix style check 2020-08-26 15:31:48 -07:00
bharatnc
593f054b10 minor fix exception message 2020-08-26 15:31:48 -07:00
bharatnc
3a35aedb56 add comments explaining index_granularity_bytes safe guard 2020-08-26 15:31:48 -07:00
bharatnc
4ac9b59cec format file 2020-08-26 15:31:48 -07:00
bharatnc
37416045ba setting min_index_granularity_bytes
This PR adds a new setting called `min_index_granularity_bytes`.

If the `index_granularity_bytes` is > 0 and is lesser than the
`min_index_granularity_bytes`, throw an exception inside the
`registerStorageMergeTree.cpp` file.
2020-08-26 15:31:48 -07:00
Anton Popov
eeb78bf291 slightly optimize very short queries with LowCardinality 2020-08-26 21:46:18 +03:00
Alexey Milovidov
2a09aa53cc Support parallel INSERT for more table engines 2020-08-26 19:41:30 +03:00
alexey-milovidov
c157b7a685
Merge pull request #14056 from ClickHouse/alternative-14043
Alternative implementation of #14043
2020-08-26 13:15:30 +03:00
alexey-milovidov
d3a9389465
Merge branch 'master' into bharatnc-ncb/timezones-table 2020-08-26 04:26:37 +03:00
alexey-milovidov
c1c5474730
Merge pull request #14051 from javisantana/fix/info_in_read_only_table
adds some info to the exception about zookeeper path
2020-08-26 02:27:01 +03:00
Alexey Milovidov
0101fa0af9 Fix error 2020-08-26 02:12:16 +03:00
Alexey Milovidov
63feb75306 Some tweaks 2020-08-25 23:49:22 +03:00
Alexey Milovidov
64af0db94a Fix error 2020-08-25 23:40:32 +03:00
Alexey Milovidov
7aadd3803c Fix error 2020-08-25 22:46:47 +03:00
Alexey Milovidov
b3845b10d4 More simple 2020-08-25 20:54:44 +03:00
Alexey Milovidov
39730bfc30 Alternative implementation of #14043 2020-08-25 20:42:35 +03:00
alexey-milovidov
ea4aa34697
Little bit more pretty 2020-08-25 20:09:35 +03:00
Javi Santana
4942d85090 adds some info to the exception about zookeeper path 2020-08-25 18:09:22 +02:00
Alexey Milovidov
31240aa243 Minor modifications 2020-08-24 23:35:38 +03:00
bharatnc
70d00abe4f try and fix gcc-9 build.
This tries to fix the failing gcc-9 unbundled build:

https://clickhouse-builds.s3.yandex.net/13880/e437d85b927a47da69b8bdc4dde95917c2261cbe/clickhouse_build_check/build_log_753740668_1598037713.txt
2020-08-24 23:31:21 +03:00
bharatnc
a44a90fe99 remove older script that generated tz data 2020-08-24 23:30:41 +03:00
Alexey Milovidov
b504b9a917 Fix conflict + minor modification. 2020-08-24 23:29:56 +03:00
bharatnc
b85bcc5b8b add time_zones tables
This table adds a new table called the `time_zones` table:

```
:) select * from system.time_zones limit 10;

SELECT *
FROM system.time_zones
LIMIT 10

┌─time_zone──────────┐
│ Africa/Abidjan     │
│ Africa/Accra       │
│ Africa/Addis_Ababa │
│ Africa/Algiers     │
│ Africa/Asmara      │
│ Africa/Asmera      │
│ Africa/Bamako      │
│ Africa/Bangui      │
│ Africa/Banjul      │
│ Africa/Bissau      │
└────────────────────┘

10 rows in set. Elapsed: 0.012 sec.
```

The available timezones are parsed from under
`ClickHouse/contrib/cctz/testdata/zoneinfo` through a script
and the table content is constructed from the
StorageSystemTimeZones.generated.cpp`.

I was able to test this locally and was able to get a list of time
zones as shown above.
2020-08-24 23:26:00 +03:00
alexey-milovidov
7ea5364299
Merge pull request #13648 from filimonov/tzdata_version2
tzdata improvements
2020-08-24 23:07:37 +03:00
Alexander Tokmakov
dd4b8b9663 fix lock order inversion when renaming distributed table 2020-08-20 16:36:22 +03:00
tavplubix
de3a6d78fc
Merge pull request #13822 from zhang2014/fix/materialize_integration_test
ISSUES-4006 try fix materialize mysql database integration test
2020-08-19 17:32:38 +03:00
Artem Zuikov
becc186c91
Add support for extended precision integers and decimals (#13097) 2020-08-19 14:52:17 +03:00
alexey-milovidov
23ccb0b6be
Merge pull request #13677 from hagen1778/merge-tree-fail-fast-on-rows-limit
[mergeTree]: fail fast if max_rows_to_read limit exceeded on parts scan
2020-08-18 22:24:39 +03:00
Alexey Milovidov
9615b1f06a Generate ya.make 2020-08-18 12:46:02 +03:00
Alexander Tokmakov
f5c14a0766 Merge branch 'master' into fix/materialize_integration_test 2020-08-17 21:47:53 +03:00
zhang2014
ead3d34323 ISSUES-4006 try fix build 2020-08-17 18:11:50 +08:00
roman
35e28b4c6b [mergeTree]: make exception message more clear 2020-08-17 09:52:04 +01:00
zhang2014
2cbc1df3ce ISSUES-4006 try fix bad integration test 2020-08-17 13:14:02 +08:00
Vitaly Baranov
29a6558d33 Add system table system.user_directories 2020-08-16 19:15:39 +03:00
Vitaly Baranov
2909ed1bc0 Better initialization of access storages. Make list of access storages dynamic. 2020-08-16 19:15:34 +03:00
alexey-milovidov
f3755fecb7
Merge pull request #13793 from amosbird/fnc
Fix set index with const column pred
2020-08-16 15:18:31 +03:00
Alexey Milovidov
44fb1ec107 Fix typo 2020-08-16 13:15:35 +03:00
Amos Bird
ae2c50e9e8
Fix set index with const column pred 2020-08-16 15:16:37 +08:00
alexey-milovidov
cd417bb066
Merge pull request #13757 from ClickHouse/fix-flaky-test-3
Fix flaky test 01305_replica_create_drop_zookeeper
2020-08-16 10:15:30 +03:00