From 07f1fd15103f58f672fd2d6f51a5b2fbd79b3ca2 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 2 Dec 2025 13:48:01 +0100 Subject: [PATCH 1/4] require notwindows on the test to avoid nightly fails --- src/include/duckdb/common/allocator.hpp | 1 - test/sql/sample/test_sample_too_big.test | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/duckdb/common/allocator.hpp b/src/include/duckdb/common/allocator.hpp index 14c2c77c923d..caa7166b8fdc 100644 --- a/src/include/duckdb/common/allocator.hpp +++ b/src/include/duckdb/common/allocator.hpp @@ -89,7 +89,6 @@ class AllocatedData { }; class Allocator { -public: // 281TB ought to be enough for anybody static constexpr const idx_t MAXIMUM_ALLOC_SIZE = 281474976710656ULL; diff --git a/test/sql/sample/test_sample_too_big.test b/test/sql/sample/test_sample_too_big.test index c5b9351e4ea9..079e0e44742a 100644 --- a/test/sql/sample/test_sample_too_big.test +++ b/test/sql/sample/test_sample_too_big.test @@ -2,6 +2,8 @@ # description: Test SAMPLE keyword # group: [sample] +require notwindows + statement ok CREATE TABLE t1(a INT); From 15b866d9ab2450aa1fec4acdb300d5e50a16b1de Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 2 Dec 2025 13:51:44 +0100 Subject: [PATCH 2/4] fix test on windows --- src/include/duckdb/parser/parsed_data/sample_options.hpp | 5 +++++ test/sql/sample/test_sample_too_big.test | 1 + 2 files changed, 6 insertions(+) diff --git a/src/include/duckdb/parser/parsed_data/sample_options.hpp b/src/include/duckdb/parser/parsed_data/sample_options.hpp index 766345f0e1d8..345070648918 100644 --- a/src/include/duckdb/parser/parsed_data/sample_options.hpp +++ b/src/include/duckdb/parser/parsed_data/sample_options.hpp @@ -24,8 +24,13 @@ string SampleMethodToString(SampleMethod method); class SampleOptions { public: +#ifdef WIN32 + // 10 million on windows is enough + static constexpr idx_t MAX_SAMPLE_ROWS = 10000000; +#else // 1 billion rows should be enough. static constexpr idx_t MAX_SAMPLE_ROWS = 1000000000; +#endif public: explicit SampleOptions(int64_t seed_ = -1); diff --git a/test/sql/sample/test_sample_too_big.test b/test/sql/sample/test_sample_too_big.test index 079e0e44742a..2de865fef2d1 100644 --- a/test/sql/sample/test_sample_too_big.test +++ b/test/sql/sample/test_sample_too_big.test @@ -2,6 +2,7 @@ # description: Test SAMPLE keyword # group: [sample] +# sample max on windows 32 bit is 10000000, otherwise 1000000000 require notwindows statement ok From 15a1daa70a5af18c3f5d80e2f354da160212714f Mon Sep 17 00:00:00 2001 From: Tmonster Date: Tue, 2 Dec 2025 23:00:35 +0100 Subject: [PATCH 3/4] require 16gb ram instead --- test/sql/sample/test_sample_too_big.test | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/sql/sample/test_sample_too_big.test b/test/sql/sample/test_sample_too_big.test index 2de865fef2d1..37a619d461db 100644 --- a/test/sql/sample/test_sample_too_big.test +++ b/test/sql/sample/test_sample_too_big.test @@ -2,8 +2,7 @@ # description: Test SAMPLE keyword # group: [sample] -# sample max on windows 32 bit is 10000000, otherwise 1000000000 -require notwindows +require ram 16gb statement ok CREATE TABLE t1(a INT); From e04f3bc571fdad3d01709bb57e8ed312af9d33e6 Mon Sep 17 00:00:00 2001 From: Tmonster Date: Wed, 3 Dec 2025 09:43:15 +0100 Subject: [PATCH 4/4] remove windows specific limit --- src/include/duckdb/parser/parsed_data/sample_options.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/include/duckdb/parser/parsed_data/sample_options.hpp b/src/include/duckdb/parser/parsed_data/sample_options.hpp index 345070648918..766345f0e1d8 100644 --- a/src/include/duckdb/parser/parsed_data/sample_options.hpp +++ b/src/include/duckdb/parser/parsed_data/sample_options.hpp @@ -24,13 +24,8 @@ string SampleMethodToString(SampleMethod method); class SampleOptions { public: -#ifdef WIN32 - // 10 million on windows is enough - static constexpr idx_t MAX_SAMPLE_ROWS = 10000000; -#else // 1 billion rows should be enough. static constexpr idx_t MAX_SAMPLE_ROWS = 1000000000; -#endif public: explicit SampleOptions(int64_t seed_ = -1);