Fix arrayFill for empty arrays.#12279
Merged
alexey-milovidov merged 2 commits intomasterfrom Jul 8, 2020
Merged
Conversation
Member
Author
|
@alesapin Tests did not run in 4 hours. |
Member
Problems in CI, fixing... |
robot-clickhouse
added a commit
that referenced
this pull request
Jul 9, 2020
…f921a02c9290fd70e9e3d60f399c2 Cherry pick #12279 to 20.5: Fix arrayFill for empty arrays.
alexey-milovidov
added a commit
that referenced
this pull request
Jul 10, 2020
* kafka: remove outdated comment As stated by @filimonov it is not relevant (after #11599) * Added test. * Create codeql-analysis.yml * Tiny fixes * Create anchore-analysis.yml * Update polymorphic_parts_s.xml * Update polymorphic_parts_m.xml * Update polymorphic_parts_l.xml * Changelog for 20.5 * Update CHANGELOG.md * Update README.md * Fix test (#12088) * Test for a fixed issue #10668, related to input_format_allow_errors_num in CSV * Add unbundled mode flag * Remove LC converting to Arrow. * Remove LC converting to Arrow. * Move skip lists to clickhouse-test * Remove LC converting to Arrow. * More verbose message about skip * Make skip-list optional * Added test. * Create initializeAggregation to initialize an aggregation function based on a value * Add type column in system.disks * Update clickhouse-test * fix test with UBSan * Add missing query context for system logs Needed to allow attaching materialized views with joins or with subqueries to system.logs. * Fix handling dependency of table with ENGINE=Dictionary on dictionary. * Add test. * Update 01355_CSV_input_format_allow_errors.sh * Update CHANGELOG.md * Update Dockerfile * Added a showcase of minimal Docker image * Added a comment * Added a comment * Added a comment * Formatting * contrib/unixodbc-cmake: Fix build when UNBUNDLED target_compile_definitions may only set INTERFACE properties on IMPORTED targets * Fix version column in replicated version collapsing merge tree (#12121) * poco-cmake: Fix Poco::Data::ODBC target when UNBUNDLED By default IMPORTED target has a scope in the directory in which it is created and below. This leads to the following issues when building UNBUNDLED: Target "clickhouse" links to target "Poco::Data::ODBC" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? * Add missed <atomic> include in ProxyListConfiguration * Improve performace of reading in order of sorting key. (#11696) * simplify reading in order of sorting key * add perf test for reading many parts * Revert "simplify reading in order of sorting key" This reverts commit 7267d7c. * add threshold for preliminary merge for reading in order * better threshold * limit threads in test * Do not enable sentry if ENABLE_LIBRARIES is not set * Fail if curl library was enabled and was not found in case of unbundled build * Normalize "pid" file handling #3501 * Update StatusFile.cpp * New ISO8601 year modificators for formatDateTime * Added a test * Include libcurl4-openssl-dev into yandex/clickhouse-deb-builder * Remove harmful code from "geoDistance" #12117 * Update formatDateTime.cpp * Fix warnings from CodeQL * Added a test * Minor modification * Update libdivide to the latest master * Replace exit to abort in libdivide * Fix potential overflow in integer division #12119 * Added a test * Whitespace * Added a test for #4211 * Attempt to fix "Arcadia" build * Rename test * Update arraySum.cpp * Run perf tests with memory sampling (for allocations >1M) This is to know the memory allocation size distribution, that can be obtained later from left-metric-log.tsv. This is an attempt to tune tcmalloc (new CPP version by google) to use lock-free part of the allocator for typical allocations (and it is a bad idea just to increase kMaxSize there, since number of allocation for each size class is also important). P.S. hope that this file will be applied, if no, then the same effect can be reached by tunning defaults in Settings.h Refs: #11590 Cc: @akuzm * Make code clearer: use enum instead of `bool internal`. * Update StorageDictionary.h * Update StorageDictionary.h * ILIKE operator (#12125) * Integrated CachingAllocator into MarkCache * fixed build errors * reset func hotfix * upd: Fixing build * updated submodules links * fix 2 * updating grabber allocator proto * updating lost work * updating CMake to use concepts * some other changes to get it building (integration into MarkCache) * further integration into caches * updated Async metrics, fixed some build errors * and some other errors revealing * added perfect forwarding to some functions * fix: forward template * fix: constexpr modifier * fix: FakePODAllocator missing member func * updated PODArray constructor taking alloc params * fix: PODArray overload with n restored * fix: FakePODAlloc duplicating alloc() func * added constexpr variable for alloc_tag_t * split cache values by allocators, provided updates * fix: memcpy * fix: constexpr modifier * fix: noexcept modifier * fix: alloc_tag_t for PODArray constructor * fix: PODArray copy ctor with different alloc * fix: resize() signature * updating to lastest working master * syncing with 273267 * first draft version * fix: update Searcher to case-insensitive * added ILIKE test * fixed style errors, updated test, split like and ilike, added notILike * replaced inconsistent comments * fixed show tables ilike * updated missing test cases * regenerated ya.make * Update 01355_ilike.sql Co-authored-by: myrrc <[email protected]> Co-authored-by: alexey-milovidov <[email protected]> * Update SortDescription.h * Update AggregateDescription.cpp * add parseDateTimeBestEffortUS function (#12028) * add function parseDateTimeBestEffortUS * add test * add doc Co-authored-by: alexey-milovidov <[email protected]> * Cleanup changelog (half done). Now it is acceptable #12104 * Cleanup changelog (half done). Now it is more acceptable #12104 * Cleanup changelog (half done). Now it is more acceptable #12104 * Cleanup changelog (half done). Additions requested by @filimonov #12104 * Remove underscore as word-break character. This partially reverts #11975 * Fix bad test number * Added a test * Change exception code from LOGICAL_ERROR to BAD_ARGUMENTS when the name of remote table is empty * fix segfault with -StateResample combinators * Fix bad code in redundant ORDER BY optimization #10067 * Add a test * Support KILL QUERY [connection_id] for MySQL * Fix error * Autocomplete does not have to work in "Unbundled" build * Fix transform query for external databases in presense of aliases #12032 * Whitespace * Add MySQL to ClickHouse query replacement mapping table * Style * update ya.make * Added function "hasThreadFuzzer" * Fix test under ThreadFuzzer * Test for issue #9088 ALTER DELETE unexpectedly deletes NULL rows * Remove unused potentially dangerous function * Fix mutations interpreter #9088 * Added a test * Added another test just in case * Added yet another test just in case * Update 01358_mutation_delete_null_rows.sql * Fix test * Fix flaky test * Attempt to fix flaky test 00721_force_by_identical_result_after_merge_zookeeper * [anchore] more detailed Dockerfile scan reports (#12159) * Update Dockerfile * Update array-functions.md (#12130) 修改编码错误 * Add integration test for mysql replacement query * Update array-functions.md (#12129) 修改编码错误 * fix ubsan final * [docs] improve redirects destination * Update SECURITY.md (#12161) * Update Dockerfile * Update questdb_sum_double.xml * Place common docker compose files to integration docker container * done * add cluster() adn clusterAllReplicas() table functions description, add signatures to remoteSecure() table function (#12156) * add cluster() adn clusterAllReplicas() table functions description, add signatures to remoteSecure() table function Signed-off-by: Slach <[email protected]> * small russian fixes Signed-off-by: Slach <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> * Update docs/en/sql-reference/table-functions/cluster.md Co-authored-by: Ivan Blinkov <[email protected]> Co-authored-by: Ivan Blinkov <[email protected]> * Remove -v from ninja * [docs] introduction for integration table engines (#12167) * [docs] introduction for integration table engines * Update jdbc.md * Update odbc.md * Update mysql.md * Update kafka.md * Update hdfs.md * Fix #10437, CR fixes * fix style * add select final to test * Same change for Kafka - just in case, and to make it conform. * [docs] add redirect from an introduction index page (#12176) * [website] add apple-touch-icon (#12164) * Better assert * Don't split dictionary source's table name into schema and table name itself if ODBC driver doesn't support schema. * Sync reference file with changes in sql file * [docs] introduction for third-party interfaces (#12175) * [docs] introduction for third-party interfaces * Update index.md * Update index.md * [docs] introduction for special table engines (#12170) * [docs] introduction for integration table engines * Update jdbc.md * Update odbc.md * Update mysql.md * Update kafka.md * Update hdfs.md * [docs] introduction for special table engines * Update index.md * Update index.md * split * A test for UInt8 as bool * Included const uint8 values in test * changelog fixes * remove questionable functionality * Tests for fixed issues #10846 and #7347 * Simple (and fast) inplace fix for UInt8 -> bool * style fix for #12152 * Added test for #3767 * Update zh kafka.md title (#12192) * Update index.md (#12191) Fix merge link broken * changelog fixes * DOCSUP-1348 Russian translation for new functions (#133) (#12194) * Russian translation for new functions * Apply suggestions from code review Co-authored-by: BayoNet <[email protected]> * Minor updates to russian text. Co-authored-by: Olga Revyakina <[email protected]> Co-authored-by: BayoNet <[email protected]> Co-authored-by: Sergei Shtykov <[email protected]> Co-authored-by: olgarev <[email protected]> Co-authored-by: Olga Revyakina <[email protected]> * Add runner for testflows * No color * throw exception on redirect limit in S3 request * [docs] add intrdocution for commercial page (#12187) * DOCS-647: toStartOfSecond (#12190) * DOCSUP-1120 Documentation for the toStartOfSecond function (#131) * Doc toStartOfSecond function * Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: BayoNet <[email protected]> * Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: BayoNet <[email protected]> * Minor update for english text, russian translation added. Co-authored-by: Olga Revyakina <[email protected]> Co-authored-by: BayoNet <[email protected]> * CLICKHOUSEDOCS-647: Minor text edits. * Update docs/en/sql-reference/functions/date-time-functions.md * Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: olgarev <[email protected]> Co-authored-by: Olga Revyakina <[email protected]> Co-authored-by: Sergei Shtykov <[email protected]> Co-authored-by: Ivan Blinkov <[email protected]> * [docs] refactor Domains overview (#12186) * Add to images.json * Sanitize LINK_LIBRARIES property for the directories (#12160) When you will try to link target with the directory (that exists), cmake will skip this without an error, only the following warning will be reported: target_link_libraries(main /tmp) WARNING: Target "main" requests linking to directory "/tmp". Targets may link only to libraries. CMake is dropping the item. And there is no cmake policy that controls this. (I guess the reason that it is allowed is because of FRAMEWORK for OSX). So to avoid error-prone cmake rules, this can be sanitized. There are the following ways: - overwrite target_link_libraries()/link_libraries() and check *before* calling real macro, but this requires duplicate all supported syntax -- too complex - overwrite target_link_libraries() and check LINK_LIBRARIES property, this works great -- but cannot be used with link_libraries() - use BUILDSYSTEM_TARGETS property to get list of all targets and sanitize -- this will work. I also tested it with the following patch: $ git di diff --git a/base/daemon/CMakeLists.txt b/base/daemon/CMakeLists.txt index 26d59a5..35e6ff6432 100644 --- a/base/daemon/CMakeLists.txt +++ b/base/daemon/CMakeLists.txt @@ -9,4 +9,5 @@ target_link_libraries (daemon PUBLIC loggers PRIVATE clickhouse_common_io clickh if (USE_SENTRY) target_link_libraries (daemon PRIVATE ${SENTRY_LIBRARY}) + target_link_libraries (daemon PRIVATE /tmp) endif () And it works: CMake Error at cmake/sanitize_target_link_libraries.cmake:48 (message): daemon requested to link with directory: /tmp Call Stack (most recent call first): cmake/sanitize_target_link_libraries.cmake:55 (sanitize_link_libraries) CMakeLists.txt:425 (include) Refs: #12041 * Revert "Run perf tests with memory sampling (for allocations >1M)" * too slow * [docs] add intrdocution for statements page (#12189) * [docs] add intrdocution for statements page * Update index.md * Update index.md * Update README.md * Update README.md * Update README.md * Rename ident to indent. * Fix minor issues after #12196 * Implement getLeastSuperType for LowCardinality #8212 * Implement supertype for LowCardinality * Whitespace * Update test * Added a test for PaddedPODArray just in case * Add documentation for arrayFill * Fix ugly ugliness * Added a test * Non-significant changes * Update README.md * Update int_parsing.xml * Update build.sh * Update packager * Hide nonzero error code on testflows runner * try remove strange logic in DuplicateOrderByVisitor (#12267) * Update README.md Co-authored-by: Azat Khuzhin <[email protected]> Co-authored-by: Nikolai Kochetov <[email protected]> Co-authored-by: Nikolai Kochetov <[email protected]> Co-authored-by: Ivan Blinkov <[email protected]> Co-authored-by: alesapin <[email protected]> Co-authored-by: Alexander Kuzmenkov <[email protected]> Co-authored-by: Alexander Kuzmenkov <[email protected]> Co-authored-by: Mikhail Filimonov <[email protected]> Co-authored-by: Guillaume Tassery <[email protected]> Co-authored-by: Anton Ivashkin <[email protected]> Co-authored-by: alexey-milovidov <[email protected]> Co-authored-by: Vitaly Baranov <[email protected]> Co-authored-by: Ilya Yatsishin <[email protected]> Co-authored-by: Nikita Mikhaylov <[email protected]> Co-authored-by: tavplubix <[email protected]> Co-authored-by: tavplubix <[email protected]> Co-authored-by: Matwey V. Kornilov <[email protected]> Co-authored-by: Anton Popov <[email protected]> Co-authored-by: vivarum <[email protected]> Co-authored-by: myrrc <[email protected]> Co-authored-by: myrrc <[email protected]> Co-authored-by: flynn <[email protected]> Co-authored-by: BohuTANG <[email protected]> Co-authored-by: yhgcn <[email protected]> Co-authored-by: Eugene Klimov <[email protected]> Co-authored-by: Nikita Mikhailov <[email protected]> Co-authored-by: Alexander Kazakov <[email protected]> Co-authored-by: BayoNet <[email protected]> Co-authored-by: Sergei Shtykov <[email protected]> Co-authored-by: olgarev <[email protected]> Co-authored-by: Olga Revyakina <[email protected]> Co-authored-by: Artem Zuikov <[email protected]>
alesapin
pushed a commit
that referenced
this pull request
Jul 10, 2020
Fix arrayFill for empty arrays. (cherry picked from commit df8cde7)
alesapin
pushed a commit
that referenced
this pull request
Jul 10, 2020
Fix arrayFill for empty arrays. (cherry picked from commit df8cde7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
The function
arrayFillworked incorrectly for empty arrays that may lead to crash. This fixes #12263.