Skip to content

Commit 94356bc

Browse files
Merge master into fix-concat-variant-low-cardinality
2 parents 054ba33 + 7e5828b commit 94356bc

File tree

300 files changed

+2707
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+2707
-528
lines changed

.claude/skills/build/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
4343
1. **Determine build configuration:**
4444
- Build type: `$0` or `RelWithDebInfo` if not specified
4545
- Target: `$1` or `clickhouse` if not specified
46-
- Build directory: `build/${buildType}` (e.g., `build/RelWithDebInfo`, `build/Debug`, `build/ASAN`)
46+
- Build directory: `build` (e.g., `build`, `build_debug`, `build_asan`)
4747

4848
2. **Create log file and start the build:**
4949

@@ -62,7 +62,7 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
6262

6363
**Step 2b: Start the ninja build:**
6464
```bash
65-
cd build/${buildType} && ninja [target] > [log file path] 2>&1
65+
cd build && ninja [target] > [log file path] 2>&1
6666
```
6767

6868
When using ninja you can pass `-k{num}` to continue building even if some targets fail. For example, `-k20` will keep going after 20 failures. Adjust this number based on your needs.
@@ -90,7 +90,7 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
9090

9191
**If build succeeds:**
9292
- Confirm build completed successfully
93-
- Report binary location: `build/${buildType}/programs/[target]`
93+
- Report binary location: `build/programs/[target]`
9494
- Mention any warnings if present
9595
- Report build time if available
9696
- Keep response concise
@@ -161,7 +161,7 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
161161
- Run: pkill -f \"clickhouse[- ]server\"
162162
- Wait 1 second: sleep 1
163163
- Verify stopped: pgrep -f \"clickhouse[- ]server\" should return nothing
164-
- Report: \"Server stopped. To start the new version, run: ./build/${buildType}/programs/clickhouse server --config-file ./programs/server/config.xml\"
164+
- Report: \"Server stopped. To start the new version, run: ./build/programs/clickhouse server --config-file ./programs/server/config.xml\"
165165
- If user chooses \"No, keep it running\":
166166
- Report: \"Server remains running with the old binary. You'll need to manually restart it to use the new build.\"
167167
@@ -180,7 +180,7 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
180180

181181
**For successful builds:**
182182
- Confirm the build completed successfully
183-
- Report the binary location: `build/${buildType}/programs/[target]`
183+
- Report the binary location: `build/programs/[target]`
184184
- Report the server status outcome from step 5
185185

186186
**For failed builds:**
@@ -207,11 +207,11 @@ Build ClickHouse in `build` or `build_debug`, `build_asan`, `build_tsan`, `build
207207

208208
- Always run from repository root
209209
- **NEVER** create build directories or run `cmake` - the build directory must already be configured
210-
- Build directories follow pattern: `build/${buildType}` (e.g., `build/Debug`, `build/ASAN`)
211-
- Binaries are located in: `build/${buildType}/programs/`
210+
- Build directories follow pattern: `build` (e.g., `build_debug`, `build_asan`)
211+
- Binaries are located in: `build/programs/`
212212
- This skill only runs incremental builds with `ninja`
213213
- To configure a new build directory, the user must manually run CMake first
214-
- For a clean build, the user should remove `build/${buildType}` and reconfigure manually
214+
- For a clean build, the user should remove `build` and reconfigure manually
215215
- **MANDATORY:** After successful builds, this skill MUST check for running ClickHouse servers and ask the user if they want to stop them to use the new build
216216
- **MANDATORY:** ALL build output (success or failure) MUST be analyzed by a Task agent with `subagent_type=general-purpose`
217217
- **MANDATORY:** ALWAYS provide a final summary to the user at the end of the skill execution (step 6)

ci/jobs/functional_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def configure_log_export():
432432
commands.append(CH.enable_thread_fuzzer_config)
433433

434434
os.environ["MALLOC_CONF"] = (
435-
f"prof_active:true,prof_prefix:{temp_dir}/jemalloc_profiles/clickhouse.jemalloc"
435+
f"prof_prefix:{temp_dir}/jemalloc_profiles/clickhouse.jemalloc"
436436
)
437437

438438
if not is_coverage:

ci/jobs/scripts/clickhouse_proc.py

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,45 @@ def create_minio_log_tables(self):
534534
verbose=True,
535535
strict=True,
536536
)
537-
status = (
538-
"failed"
539-
if not res
540-
else Shell.get_output(
537+
if not res:
538+
return False
539+
540+
# Restart minio with a timeout to avoid hanging forever (see #97647).
541+
# If the restart hangs, kill minio and start it again.
542+
restart_timeout = 60
543+
try:
544+
print(f"Restarting clickminio (timeout {restart_timeout}s)")
545+
result = subprocess.run(
541546
"/mc admin service restart clickminio --wait --json 2>&1 | jq -r .status",
547+
shell=True,
548+
stdout=subprocess.PIPE,
549+
stderr=subprocess.PIPE,
550+
text=True,
551+
timeout=restart_timeout,
552+
executable="/bin/bash",
553+
)
554+
status = result.stdout.strip()
555+
except subprocess.TimeoutExpired:
556+
print(
557+
f"WARNING: minio restart timed out after {restart_timeout}s, killing and restarting"
558+
)
559+
Shell.check("pkill -9 -f 'minio server'", verbose=True)
560+
time.sleep(2)
561+
Shell.check(
562+
f"nohup minio server --address :11111 {temp_dir}/minio_data &",
542563
verbose=True,
543564
)
544-
)
565+
# Wait for minio to be ready
566+
for _ in range(30):
567+
if Shell.check(
568+
"/mc ls clickminio/test", verbose=False
569+
):
570+
status = "success"
571+
break
572+
time.sleep(1)
573+
else:
574+
status = "failed"
575+
545576
res = "success" in status
546577
if not res:
547578
print(f"ERROR: Failed to restart clickminio, status: {status}")

docs/en/sql-reference/table-functions/iceberg.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ y: 993
420420

421421
### Schema evolution {#iceberg-writes-schema-evolution}
422422

423-
ClickHouse allows you to add, drop, or modify columns with simple types (non-tuple, non-array, non-map).
423+
ClickHouse allows you to add, drop, modify, or rename columns with simple types (non-tuple, non-array, non-map).
424424

425425
### Example {#example-iceberg-writes-evolution}
426426

@@ -479,6 +479,27 @@ Row 1:
479479
──────
480480
x: Ivanov
481481
y: 993
482+
483+
ALTER TABLE iceberg_writes_example RENAME COLUMN y TO value;
484+
SHOW CREATE TABLE iceberg_writes_example;
485+
486+
┌─statement─────────────────────────────────────────────────┐
487+
1. │ CREATE TABLE default.iceberg_writes_example ↴│
488+
│↳( ↴│
489+
│↳ `x` Nullable(String), ↴│
490+
│↳ `value` Nullable(Int64) ↴│
491+
│↳) ↴│
492+
│↳ENGINE = IcebergLocal('/home/scanhex12/iceberg_example/') │
493+
└───────────────────────────────────────────────────────────┘
494+
495+
SELECT *
496+
FROM iceberg_writes_example
497+
FORMAT VERTICAL;
498+
499+
Row 1:
500+
──────
501+
x: Ivanov
502+
value: 993
482503
```
483504

484505
### Compaction {#iceberg-writes-compaction}

programs/benchmark/Benchmark.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <boost/program_options.hpp>
1919
#include <Common/ConcurrentBoundedQueue.h>
2020
#include <Common/Exception.h>
21+
#include <Common/ErrnoException.h>
2122
#include <Common/randomSeed.h>
2223
#include <Common/clearPasswordFromCommandLine.h>
2324
#include <Core/Settings.h>

programs/disks/DisksApp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <Client/ClientBase.h>
33
#include <Client/ReplxxLineReader.h>
44
#include <Common/Exception.h>
5+
#include <Common/ErrnoException.h>
56
#include <Common/SignalHandlers.h>
67
#include <Common/filesystemHelpers.h>
78
#include <Common/Config/ConfigProcessor.h>

programs/install/Install.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#endif
1717

1818
#include <Common/Exception.h>
19+
#include <Common/ErrnoException.h>
1920
#include <Common/ShellCommand.h>
2021
#include <Common/formatReadable.h>
2122
#include <Common/Config/ConfigProcessor.h>

programs/keeper-bench/Runner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <Common/Config/ConfigProcessor.h>
2727
#include <Common/EventNotifier.h>
2828
#include <Common/Exception.h>
29+
#include <Common/ErrnoException.h>
2930
#include <Common/ZooKeeper/IKeeper.h>
3031
#include <Common/ZooKeeper/ShuffleHost.h>
3132
#include <Common/ZooKeeper/ZooKeeperArgs.h>

programs/keeper-client/KeeperClient.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <Common/ZooKeeper/ZooKeeperArgs.h>
1010
#include <Common/filesystemHelpers.h>
1111
#include <Common/ZooKeeper/ZooKeeper.h>
12+
#include <Common/ErrnoException.h>
1213
#include <Parsers/parseQuery.h>
1314
#include <Poco/Util/HelpFormatter.h>
1415

@@ -355,15 +356,21 @@ void KeeperClient::runInteractiveReplxx()
355356
cout << std::endl;
356357
}
357358

359+
/// In tests-mode, commands are read line by line from stdin.
360+
/// After each command, a separator (four BEL characters + newline) is written
361+
/// to stdout so the test harness can detect where one command's output ends.
362+
/// Errors from failed commands go to stderr.
363+
/// We must flush stderr before writing the separator to stdout, otherwise
364+
/// the test harness may see the separator first and miss the error.
358365
void KeeperClient::runInteractiveInputStream()
359366
{
360367
for (String input; std::getline(std::cin, input);)
361368
{
362369
if (!processQueryText(input, /*is_interactive=*/true))
363370
break;
364371

365-
cout << "\a\a\a\a" << std::endl;
366372
cerr << std::flush;
373+
cout << "\a\a\a\a" << std::endl;
367374
}
368375
}
369376

programs/local/LocalServer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <Access/MemoryAccessStorage.h>
3030
#include <Common/PoolId.h>
3131
#include <Common/Exception.h>
32+
#include <base/errnoToString.h>
3233
#include <Common/Macros.h>
3334
#include <Common/Config/ConfigProcessor.h>
3435
#include <Common/ThreadStatus.h>

0 commit comments

Comments
 (0)