ClickHouse® is a real-time analytics DBMS
Go to file
Azat Khuzhin 344298f403 Fix CAST from Nullable with cast_keep_nullable
UBsan report [1]:

    SELECT toUInt32OrDefault(toNullable(0)) SETTINGS cast_keep_nullable = 1

    ../src/Common/assert_cast.h:50:12: runtime error: downcast of address 0x000029461170 which does not point to an object of type 'const DB::ColumnNullable'
    0x000029461170: note: object is of type 'DB::ColumnVector<unsigned int>'
     00 00 00 00  a0 51 3d 09 00 00 00 00  01 00 00 00 00 00 00 00  a0 3f 4e 29 00 00 00 00  a4 3f 4e 29
                  ^~~~~~~~~~~~~~~~~~~~~~~
                  vptr for 'DB::ColumnVector<unsigned int>'
        0 0x1e3e279d in DB::ColumnNullable const& assert_cast<DB::ColumnNullable const&, DB::IColumn const&>(DB::IColumn const&) obj-x86_64-linux-gnu/../src/Common/assert_cast.h:50:12
        1 0x1e3e279d in DB::ColumnNullable::insertRangeFrom(DB::IColumn const&, unsigned long, unsigned long) obj-x86_64-linux-gnu/../src/Columns/ColumnNullable.cpp:167:43
        2 0x12db4507 in DB::FunctionCastOrDefault::executeImpl() const (/src/ch/tmp/32019/clickhouse-ubsan+0x12db4507)

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/32019/9e1222a50b1805f696f4205e451365f8acdbc8a5/fuzzer_astfuzzerubsan,actions//report.html

And w/o -fsanitize=undefined:

    SELECT toUInt32OrDefault(toNullable(1), toNullable(toUInt32(1))) SETTINGS cast_keep_nullable = 1

    Received exception:
    Code: 12. DB::Exception: Parameters start = 0, length = 1 are out of bound in ColumnVector<T>::insertRangeFrom method (data.size() = 0).: While processing toUInt32OrDefault(toNullable(1), toNullable(toUInt32(1))). (PARAMETER_OUT_OF_BOUND)
2021-12-03 02:02:42 +03:00
.github Remove PVS check from master 2021-12-02 11:36:30 +03:00
base Fix magic_enum for debug helpers 2021-11-28 06:28:19 +03:00
benchmark Add benchmark for DuckDB 2021-10-31 21:05:07 +03:00
cmake Merge pull request #31951 from Algunenano/libcxx13 2021-11-30 05:23:23 +03:00
contrib Update contrib/sysroot: fix symlink 2021-12-01 17:10:28 +01:00
debian Auto version update to [21.12.1.1] [54457] 2021-11-02 00:56:45 +03:00
docker Provide clickhouse binary w/o debug symbols (stripped) in fasttest 2021-12-01 21:50:03 +03:00
docs Fix syntax error: drop comma 2021-12-01 20:12:10 +00:00
programs Merge pull request #31802 from pkit/fix_setcap 2021-11-30 05:49:03 +03:00
src Fix CAST from Nullable with cast_keep_nullable 2021-12-03 02:02:42 +03:00
tests Fix CAST from Nullable with cast_keep_nullable 2021-12-03 02:02:42 +03:00
utils Fix style-check for ProfileEvents checking 2021-12-01 10:26:00 +03:00
website Update featured image for 21.11 release blog post 2021-12-02 10:28:47 -07:00
.clang-format Fixed wrong code around Memory Profiler 2020-03-03 03:24:44 +03:00
.clang-tidy Revert "Revert "Fix tidy"" 2021-09-06 12:16:52 +03:00
.editorconfig Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.gitattributes Union merge for arcadia_skip_list.txt to avoid frequent conflicts 2021-03-10 08:50:32 +03:00
.gitignore fix style check 2021-09-21 10:28:33 +03:00
.gitmodules Merge pull request #31951 from Algunenano/libcxx13 2021-11-30 05:23:23 +03:00
.potato.yml Fix yamllint issues 2021-02-20 23:25:21 +03:00
.pylintrc Add pylintrc config 2021-01-26 23:35:56 +03:00
.vimrc Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.yamllint Drop truthy.check-keys from yamllint (does not supported on CI) 2021-02-21 06:15:36 +03:00
AUTHORS Update AUTHORS 2021-09-22 11:38:03 +03:00
CHANGELOG.md Update CHANGELOG.md 2021-11-18 12:50:41 +03:00
CMakeLists.txt Merge pull request #31957 from traceon/macos-fixes 2021-11-30 04:15:32 +03:00
CODE_OF_CONDUCT.md Add minimal code of conduct #9676 2020-03-16 12:44:28 +03:00
CONTRIBUTING.md Remove old CLA 2021-09-28 20:16:33 +03:00
docker-compose.yml Change Docker org name 2021-09-20 01:52:21 +03:00
format_sources allow several <graphite> targets (#603) 2017-03-21 23:08:09 +04:00
LICENSE Sync copyrights 2021-10-04 09:16:18 +03:00
PreLoad.cmake Update PreLoad.cmake 2021-11-25 23:53:50 +03:00
README.md Update README.md 2021-10-12 15:38:40 +03:00
release Proper build 2021-08-24 00:09:19 +00:00
SECURITY.md Update SECURITY.md 2021-11-25 00:59:52 +03:00
uncrustify.cfg Better .clang-format and uncrustify.cfg 2018-11-29 15:45:34 +03:00

ClickHouse — open source distributed column-oriented DBMS

ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time.

  • Official website has a quick high-level overview of ClickHouse on the main page.
  • Tutorial shows how to set up and query a small ClickHouse cluster.
  • Documentation provides more in-depth information.
  • YouTube channel has a lot of content about ClickHouse in video format.
  • Slack and Telegram allow chatting with ClickHouse users in real-time.
  • Blog contains various ClickHouse-related articles, as well as announcements and reports about events.
  • Code Browser with syntax highlight and navigation.
  • Contacts can help to get your questions answered if there are any.