From 8cfe0eb3f2009878ad68465b6949aed494dc2dd1 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 7 May 2023 19:31:47 +0200 Subject: [PATCH 01/11] Do not change CMAKE_EXE_LINKER_FLAGS_INIT in toolchains Otherwise check in PreLoad.cmake will throw. Signed-off-by: Azat Khuzhin --- cmake/linux/toolchain-riscv64.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/linux/toolchain-riscv64.cmake b/cmake/linux/toolchain-riscv64.cmake index ea57c3b2c42..7f876f88d72 100644 --- a/cmake/linux/toolchain-riscv64.cmake +++ b/cmake/linux/toolchain-riscv64.cmake @@ -21,7 +21,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}") set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}") -set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd") +set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=bfd") # Currently, lld does not work with the error: # ld.lld: error: section size decrease is too large From 6ae41be0ccce9bcdb16cb2a059ac315215a8d9e8 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 7 May 2023 19:32:12 +0200 Subject: [PATCH 02/11] Add riscv64 support for boringssl Signed-off-by: Azat Khuzhin --- contrib/boringssl-cmake/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/boringssl-cmake/CMakeLists.txt b/contrib/boringssl-cmake/CMakeLists.txt index 828919476a7..51137f6d04e 100644 --- a/contrib/boringssl-cmake/CMakeLists.txt +++ b/contrib/boringssl-cmake/CMakeLists.txt @@ -111,6 +111,8 @@ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips") set(ARCH "generic") elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le") set(ARCH "ppc64le") +elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "riscv64") + set(ARCH "riscv64") else() message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR}) endif() From cef98626281b928f2eddc620af9879baa49247e5 Mon Sep 17 00:00:00 2001 From: Constantine Peresypkin Date: Tue, 9 May 2023 12:40:33 -0400 Subject: [PATCH 03/11] docs: fix the is_deleted option docs - `is_deleted` type __must__ be `UInt8` and not `Int8` - strange wording on how `clean_deleted_rows` works is fixed --- .../table-engines/mergetree-family/replacingmergetree.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 81d8cc2d3ca..742ea408117 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -90,12 +90,12 @@ SELECT * FROM mySecondReplacingMT FINAL; ### is_deleted -`is_deleted` — Name of the column with the type of row: `1` is a “deleted“ row, `0` is a “state“ row. +`is_deleted` — Name of a `UInt8` column with the type of row: `1` is a “deleted“ row, `0` is a “state“ row. - Column data type — `Int8`. + Column data type — `UInt8`. Can only be enabled when `ver` is used. - The row is deleted when use the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` if the engine settings `clean_deleted_rows` has been set to `Always`. + The row is deleted when the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` is used or if the engine settings `clean_deleted_rows` has been set to `Always`. No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted one is the one kept. From 2e20603b01b000e0ab10754358cb0e7eb91762de Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 9 May 2023 13:18:09 -0400 Subject: [PATCH 04/11] Update docs/en/engines/table-engines/mergetree-family/replacingmergetree.md --- .../table-engines/mergetree-family/replacingmergetree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 742ea408117..8115b7a14ee 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -96,7 +96,7 @@ SELECT * FROM mySecondReplacingMT FINAL; Can only be enabled when `ver` is used. The row is deleted when the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` is used or if the engine settings `clean_deleted_rows` has been set to `Always`. - No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted one is the one kept. + No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted row is the one kept. From 582767e9ab3fd215942504b75286c5c785d84831 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 9 May 2023 13:18:18 -0400 Subject: [PATCH 05/11] Update docs/en/engines/table-engines/mergetree-family/replacingmergetree.md --- .../table-engines/mergetree-family/replacingmergetree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 8115b7a14ee..601711c9c14 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -92,7 +92,7 @@ SELECT * FROM mySecondReplacingMT FINAL; `is_deleted` — Name of a `UInt8` column with the type of row: `1` is a “deleted“ row, `0` is a “state“ row. - Column data type — `UInt8`. + Column data type — `UInt8`. Can only be enabled when `ver` is used. The row is deleted when the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` is used or if the engine settings `clean_deleted_rows` has been set to `Always`. From cd62df48878c4a8a037836c864b4969aa632bb46 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 9 May 2023 13:18:26 -0400 Subject: [PATCH 06/11] Update docs/en/engines/table-engines/mergetree-family/replacingmergetree.md --- .../table-engines/mergetree-family/replacingmergetree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 601711c9c14..9c18e54a565 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -90,7 +90,7 @@ SELECT * FROM mySecondReplacingMT FINAL; ### is_deleted -`is_deleted` — Name of a `UInt8` column with the type of row: `1` is a “deleted“ row, `0` is a “state“ row. +`is_deleted` — Name of a column used during a merge to determine whether the data in this row represents the state or is to be deleted; `1` is a “deleted“ row, `0` is a “state“ row. Column data type — `UInt8`. From 199838e7fb57ba5e09c94bff35fdc0ba76d86a26 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 9 May 2023 13:18:35 -0400 Subject: [PATCH 07/11] Update docs/en/engines/table-engines/mergetree-family/replacingmergetree.md --- .../table-engines/mergetree-family/replacingmergetree.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 9c18e54a565..0966168a37e 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -94,7 +94,9 @@ SELECT * FROM mySecondReplacingMT FINAL; Column data type — `UInt8`. - Can only be enabled when `ver` is used. + + :::note + `is_deleted` can only be enabled when `ver` is used. The row is deleted when the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` is used or if the engine settings `clean_deleted_rows` has been set to `Always`. No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted row is the one kept. From c75e056d98f75c5de58900916b04399fa719c30e Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 9 May 2023 13:18:42 -0400 Subject: [PATCH 08/11] Update docs/en/engines/table-engines/mergetree-family/replacingmergetree.md --- .../table-engines/mergetree-family/replacingmergetree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 0966168a37e..b8f4709c246 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -97,7 +97,7 @@ SELECT * FROM mySecondReplacingMT FINAL; :::note `is_deleted` can only be enabled when `ver` is used. - The row is deleted when the `OPTIMIZE ... FINAL CLEANUP`, or `OPTIMIZE ... FINAL` is used or if the engine settings `clean_deleted_rows` has been set to `Always`. + The row is deleted when `OPTIMIZE ... FINAL CLEANUP` or `OPTIMIZE ... FINAL` is used, or if the engine setting `clean_deleted_rows` has been set to `Always`. No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted row is the one kept. From 0a83f2aee81011c068c0267ec08a5c841a4bcdc3 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Tue, 9 May 2023 13:29:59 -0400 Subject: [PATCH 09/11] fix broken note rendering --- .../mergetree-family/replacingmergetree.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index b8f4709c246..7db2f3b465a 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -94,13 +94,13 @@ SELECT * FROM mySecondReplacingMT FINAL; Column data type — `UInt8`. - - :::note - `is_deleted` can only be enabled when `ver` is used. - The row is deleted when `OPTIMIZE ... FINAL CLEANUP` or `OPTIMIZE ... FINAL` is used, or if the engine setting `clean_deleted_rows` has been set to `Always`. - No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted row is the one kept. +:::note +`is_deleted` can only be enabled when `ver` is used. +The row is deleted when `OPTIMIZE ... FINAL CLEANUP` or `OPTIMIZE ... FINAL` is used, or if the engine setting `clean_deleted_rows` has been set to `Always`. +No matter the operation on the data, the version must be increased. If two inserted rows have the same version number, the last inserted row is the one kept. +::: ## Query clauses From 1b21f1360566da9ccf2d2bfad48f0b970e8f27ab Mon Sep 17 00:00:00 2001 From: Suzy Wang Date: Tue, 9 May 2023 13:57:22 -0700 Subject: [PATCH 10/11] ip encoding fix --- src/Functions/FunctionsCodingIP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functions/FunctionsCodingIP.cpp b/src/Functions/FunctionsCodingIP.cpp index 8279aa490db..2671418fc7b 100644 --- a/src/Functions/FunctionsCodingIP.cpp +++ b/src/Functions/FunctionsCodingIP.cpp @@ -580,7 +580,7 @@ private: #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ unalignedStoreLittleEndian(buf + 8, 0x00000000FFFF0000ull | (static_cast(ntohl(in)) << 32)); #else - unalignedStoreLittleEndian(buf + 8, 0x00000000FFFF0000ull | (static_cast(in)) << 32)); + unalignedStoreLittleEndian(buf + 8, 0x00000000FFFF0000ull | (static_cast(__builtin_bswap32(in))) << 32)); #endif } }; From 99677f3d1a58f0d143c0bf079bd35bcb4b94bc69 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 10 May 2023 00:22:55 +0300 Subject: [PATCH 11/11] Update clickhouse-test (#49712) --- tests/clickhouse-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index e61749e5377..e279b899a93 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -2244,7 +2244,7 @@ def main(args): "\nFound hung queries in processlist:", args, "red", attrs=["bold"] ) ) - print(processlist) + print(processlist.decode()) print(get_transactions_list(args)) print_stacktraces()