diff --git a/velox/benchmarks/basic/CastBenchmark.cpp b/velox/benchmarks/basic/CastBenchmark.cpp index 192997e01570f..2e7c4764c4012 100644 --- a/velox/benchmarks/basic/CastBenchmark.cpp +++ b/velox/benchmarks/basic/CastBenchmark.cpp @@ -24,7 +24,7 @@ using namespace facebook; using namespace facebook::velox; int main(int argc, char** argv) { - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; ExpressionBenchmarkBuilder benchmarkBuilder; const vector_size_t vectorSize = 1000; diff --git a/velox/benchmarks/basic/ComparisonConjunct.cpp b/velox/benchmarks/basic/ComparisonConjunct.cpp index 24aafb96c2ce2..4a35c7720570d 100644 --- a/velox/benchmarks/basic/ComparisonConjunct.cpp +++ b/velox/benchmarks/basic/ComparisonConjunct.cpp @@ -175,7 +175,7 @@ BENCHMARK(conjunctsNested) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(1'000); diff --git a/velox/benchmarks/basic/DecodedVector.cpp b/velox/benchmarks/basic/DecodedVector.cpp index ef13901452c7f..86a70a9cf2096 100644 --- a/velox/benchmarks/basic/DecodedVector.cpp +++ b/velox/benchmarks/basic/DecodedVector.cpp @@ -188,7 +188,7 @@ BENCHMARK(decodeDictionary5Nested) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(10'000); diff --git a/velox/benchmarks/basic/FeatureNormalization.cpp b/velox/benchmarks/basic/FeatureNormalization.cpp index 4730510f43243..0bab9575197df 100644 --- a/velox/benchmarks/basic/FeatureNormalization.cpp +++ b/velox/benchmarks/basic/FeatureNormalization.cpp @@ -110,7 +110,7 @@ BENCHMARK(normalizeConstant) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(); diff --git a/velox/benchmarks/basic/LikeFunctionsBenchmark.cpp b/velox/benchmarks/basic/LikeFunctionsBenchmark.cpp index 1931585fdc9a6..01bf6089dd621 100644 --- a/velox/benchmarks/basic/LikeFunctionsBenchmark.cpp +++ b/velox/benchmarks/basic/LikeFunctionsBenchmark.cpp @@ -233,7 +233,7 @@ BENCHMARK(tpchQuery20) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv, true); + folly::Init{&argc, &argv, true}; benchmark = std::make_unique(); folly::runBenchmarks(); benchmark.reset(); diff --git a/velox/benchmarks/basic/Preproc.cpp b/velox/benchmarks/basic/Preproc.cpp index 214be1fe773e2..038a681ce2cb7 100644 --- a/velox/benchmarks/basic/Preproc.cpp +++ b/velox/benchmarks/basic/Preproc.cpp @@ -444,7 +444,7 @@ BENCHMARK(allFusedWithNulls) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; benchmark = std::make_unique(); // Verify that benchmark calculations are correct. diff --git a/velox/benchmarks/basic/SelectivityVector.cpp b/velox/benchmarks/basic/SelectivityVector.cpp index 22273d3d77906..be054b52e836c 100644 --- a/velox/benchmarks/basic/SelectivityVector.cpp +++ b/velox/benchmarks/basic/SelectivityVector.cpp @@ -164,7 +164,7 @@ BENCHMARK(sumSelectivity1PerCent) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(10'000); diff --git a/velox/benchmarks/basic/SimpleArithmetic.cpp b/velox/benchmarks/basic/SimpleArithmetic.cpp index 38b290c45a030..c68a6e0935e65 100644 --- a/velox/benchmarks/basic/SimpleArithmetic.cpp +++ b/velox/benchmarks/basic/SimpleArithmetic.cpp @@ -343,7 +343,7 @@ BENCHMARK(plusCheckedLarge) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(); diff --git a/velox/benchmarks/basic/SimpleCastExpr.cpp b/velox/benchmarks/basic/SimpleCastExpr.cpp index 370f7ab3fb28e..19b5c8bfb27db 100644 --- a/velox/benchmarks/basic/SimpleCastExpr.cpp +++ b/velox/benchmarks/basic/SimpleCastExpr.cpp @@ -250,7 +250,7 @@ BENCHMARK(castStructManyFieldsNestedCastMedium) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(); folly::runBenchmarks(); diff --git a/velox/benchmarks/basic/VectorCompare.cpp b/velox/benchmarks/basic/VectorCompare.cpp index 8324b45299732..d9e1c2797bdc5 100644 --- a/velox/benchmarks/basic/VectorCompare.cpp +++ b/velox/benchmarks/basic/VectorCompare.cpp @@ -114,7 +114,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmark = std::make_unique(1000); diff --git a/velox/benchmarks/basic/VectorFuzzer.cpp b/velox/benchmarks/basic/VectorFuzzer.cpp index ba76519e9a2f9..aa387bfd8031c 100644 --- a/velox/benchmarks/basic/VectorFuzzer.cpp +++ b/velox/benchmarks/basic/VectorFuzzer.cpp @@ -128,7 +128,7 @@ BENCHMARK_RELATIVE_MULTI(flatMapArrayNested, n) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/velox/benchmarks/basic/VectorSlice.cpp b/velox/benchmarks/basic/VectorSlice.cpp index 58fa5642abf25..f6b0e3214c0f9 100644 --- a/velox/benchmarks/basic/VectorSlice.cpp +++ b/velox/benchmarks/basic/VectorSlice.cpp @@ -110,7 +110,7 @@ DEFINE_BENCHMARKS(row) } // namespace facebook::velox int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; using namespace facebook::velox; gflags::ParseCommandLineFlags(&argc, &argv, true); VELOX_CHECK_LE(FLAGS_slice_size, kVectorSize); diff --git a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp index acd59b3878fc8..bb270ac086f1c 100644 --- a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp +++ b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp @@ -23,6 +23,6 @@ int main(int argc, char** argv) { std::string kUsage( "This program benchmarks TPC-H queries. Run 'velox_tpch_benchmark -helpon=TpchBenchmark' for available options.\n"); gflags::SetUsageMessage(kUsage); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; tpchBenchmarkMain(); } diff --git a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp index d267274ce56f0..6e78b3adf6b78 100644 --- a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp +++ b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp @@ -435,7 +435,7 @@ BENCHMARK_RELATIVE_MULTI(MmapReallocateMix64) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; // TODO: add to run benchmark as a standalone program with multithreading as // well as actual memory access to trigger minor page faults in OS which traps // into kernel context to setup physical pages for the lazy-mapped virtual diff --git a/velox/common/base/benchmarks/BitUtilBenchmark.cpp b/velox/common/base/benchmarks/BitUtilBenchmark.cpp index 6f8ac7cefbbd2..be0d0819259b7 100644 --- a/velox/common/base/benchmarks/BitUtilBenchmark.cpp +++ b/velox/common/base/benchmarks/BitUtilBenchmark.cpp @@ -191,7 +191,7 @@ BENCHMARK_RELATIVE_MULTI(forEachBitFirstBitFalse) { } // namespace facebook int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/base/tests/Memcpy.cpp b/velox/common/base/tests/Memcpy.cpp index 236612db45e20..87ae3b649453c 100644 --- a/velox/common/base/tests/Memcpy.cpp +++ b/velox/common/base/tests/Memcpy.cpp @@ -58,7 +58,7 @@ struct CopyCallable { int main(int argc, char** argv) { constexpr int32_t kAlignment = folly::hardware_destructive_interference_size; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; auto chunk = bits::roundUp( std::max(FLAGS_bytes / FLAGS_threads, kAlignment), kAlignment); int64_t bytes = chunk * FLAGS_threads; diff --git a/velox/common/base/tests/StatsReporterTest.cpp b/velox/common/base/tests/StatsReporterTest.cpp index d70c00e5f4342..102b3e60f5aa5 100644 --- a/velox/common/base/tests/StatsReporterTest.cpp +++ b/velox/common/base/tests/StatsReporterTest.cpp @@ -130,7 +130,7 @@ folly::Singleton reporter([]() { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; facebook::velox::BaseStatsReporter::registered = true; return RUN_ALL_TESTS(); } diff --git a/velox/common/file/benchmark/ReadBenchmarkMain.cpp b/velox/common/file/benchmark/ReadBenchmarkMain.cpp index 848321c92de17..7dd8c8f760280 100644 --- a/velox/common/file/benchmark/ReadBenchmarkMain.cpp +++ b/velox/common/file/benchmark/ReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; ReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/common/memory/tests/MemoryPoolBenchmark.cpp b/velox/common/memory/tests/MemoryPoolBenchmark.cpp index ae13d673841e5..e2982f1f37ac2 100644 --- a/velox/common/memory/tests/MemoryPoolBenchmark.cpp +++ b/velox/common/memory/tests/MemoryPoolBenchmark.cpp @@ -239,7 +239,7 @@ BENCHMARK(FlatSticks, iters) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/process/ThreadDebugInfo.h b/velox/common/process/ThreadDebugInfo.h index 058a8a3c8e683..efc8a83dbc2f9 100644 --- a/velox/common/process/ThreadDebugInfo.h +++ b/velox/common/process/ThreadDebugInfo.h @@ -47,7 +47,7 @@ const ThreadDebugInfo* GetThreadDebugInfo(); // Install a signal handler to dump thread local debug information. This should // be called before calling folly::symbolizer::installFatalSignalCallbacks() -// which is usually called at startup via folly::Init(). This is just a default +// which is usually called at startup via folly::Init{}. This is just a default // implementation but you can install your own signal handler. Make sure to // install one at the start of your program. void addDefaultFatalSignalHandler(); diff --git a/velox/connectors/fuzzer/tests/FuzzerConnectorTest.cpp b/velox/connectors/fuzzer/tests/FuzzerConnectorTest.cpp index ef2163a315406..5f5bac1cccdb9 100644 --- a/velox/connectors/fuzzer/tests/FuzzerConnectorTest.cpp +++ b/velox/connectors/fuzzer/tests/FuzzerConnectorTest.cpp @@ -124,6 +124,6 @@ TEST_F(FuzzerConnectorTest, reproducible) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::Init init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp index 9d016cae7f7c0..31caf206bb9f5 100644 --- a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp +++ b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp @@ -329,7 +329,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); benchmarkFew = std::make_unique(1'000); diff --git a/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp b/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp index f18437f9e490b..5a8f4981b0185 100644 --- a/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp +++ b/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; GCSReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp b/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp index 5b9d233f56f15..e0037c25e1cfc 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; S3ReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp b/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp index 57dfcded14c07..0033c7b88d33e 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp @@ -132,6 +132,6 @@ TEST_F(S3InsertTest, s3InsertTest) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/tests/HiveDataSinkTest.cpp b/velox/connectors/hive/tests/HiveDataSinkTest.cpp index d4359d19c6571..848fd7790f006 100644 --- a/velox/connectors/hive/tests/HiveDataSinkTest.cpp +++ b/velox/connectors/hive/tests/HiveDataSinkTest.cpp @@ -844,6 +844,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); // Signal handler required for ThreadDebugInfoTest facebook::velox::process::addDefaultFatalSignalHandler(); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/tpch/tests/SpeedTest.cpp b/velox/connectors/tpch/tests/SpeedTest.cpp index 7df845877df62..b6734267ce863 100644 --- a/velox/connectors/tpch/tests/SpeedTest.cpp +++ b/velox/connectors/tpch/tests/SpeedTest.cpp @@ -179,7 +179,7 @@ class TpchSpeedTest { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; TpchSpeedTest speedTest; speedTest.run( diff --git a/velox/connectors/tpch/tests/TpchConnectorTest.cpp b/velox/connectors/tpch/tests/TpchConnectorTest.cpp index 7685bebf516bd..911c24745266a 100644 --- a/velox/connectors/tpch/tests/TpchConnectorTest.cpp +++ b/velox/connectors/tpch/tests/TpchConnectorTest.cpp @@ -287,6 +287,6 @@ TEST_F(TpchConnectorTest, orderDateCount) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp b/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp index fd2bb793521d0..9fff9e28b007e 100644 --- a/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp +++ b/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp @@ -593,7 +593,7 @@ void naiveDecodeBitsLE( } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; // Populate uint32 buffer diff --git a/velox/dwio/common/tests/DataBufferBenchmark.cpp b/velox/dwio/common/tests/DataBufferBenchmark.cpp index 4890f184a7383..546f1598f7d11 100644 --- a/velox/dwio/common/tests/DataBufferBenchmark.cpp +++ b/velox/dwio/common/tests/DataBufferBenchmark.cpp @@ -53,7 +53,7 @@ BENCHMARK(ChainedBufferOps, iters) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/dwio/common/tests/IntDecoderBenchmark.cpp b/velox/dwio/common/tests/IntDecoderBenchmark.cpp index fab234c025b28..a55686958bbf3 100644 --- a/velox/dwio/common/tests/IntDecoderBenchmark.cpp +++ b/velox/dwio/common/tests/IntDecoderBenchmark.cpp @@ -939,7 +939,7 @@ BENCHMARK_RELATIVE(decodeNew_64) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; // Populate uint16 buffer buffer_u16.resize(kNumElements); diff --git a/velox/dwio/dwrf/test/E2EFilterTest.cpp b/velox/dwio/dwrf/test/E2EFilterTest.cpp index cc501126e1c82..b2e61b693a269 100644 --- a/velox/dwio/dwrf/test/E2EFilterTest.cpp +++ b/velox/dwio/dwrf/test/E2EFilterTest.cpp @@ -453,6 +453,6 @@ TEST_F(E2EFilterTest, mutationCornerCases) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp b/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp index 3a73c4986291c..54d7041d8cac5 100644 --- a/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp +++ b/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp @@ -130,7 +130,7 @@ BENCHMARK(FloatColumnWriterBenchmark10000) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp b/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp index f09939325fad1..1ad26ff1d8f07 100644 --- a/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp +++ b/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp @@ -204,7 +204,7 @@ BENCHMARK_RELATIVE(GenerateAutoIdNew_64) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/dwio/parquet/tests/ParquetTpchTest.cpp b/velox/dwio/parquet/tests/ParquetTpchTest.cpp index eb08597189ce8..af4fbe60bafa2 100644 --- a/velox/dwio/parquet/tests/ParquetTpchTest.cpp +++ b/velox/dwio/parquet/tests/ParquetTpchTest.cpp @@ -239,6 +239,6 @@ TEST_F(ParquetTpchTest, Q22) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp b/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp index c633dff6fb6c4..995de4ee00020 100644 --- a/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp +++ b/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp @@ -618,6 +618,6 @@ TEST_F(E2EFilterTest, combineRowGroup) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp b/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp index cc5572aa5dca7..029655c7d0626 100644 --- a/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp +++ b/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp @@ -402,7 +402,7 @@ PARQUET_BENCHMARKS_NO_FILTER(ARRAY(BIGINT()), List); // TODO: Add all data types int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp b/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp index 7a40045b135f3..f6f8bdd0d1bc0 100644 --- a/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp +++ b/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp @@ -444,6 +444,6 @@ TEST_F(ParquetTableScanTest, readAsLowerCase) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp b/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp index 2fed88512f6d5..977332be6c7af 100644 --- a/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp +++ b/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp @@ -106,6 +106,6 @@ TEST_F(ThriftTransportTest, bufferedOutOfBoundry) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/examples/OperatorExtensibility.cpp b/velox/examples/OperatorExtensibility.cpp index b534f4f1145f6..940d001cfb010 100644 --- a/velox/examples/OperatorExtensibility.cpp +++ b/velox/examples/OperatorExtensibility.cpp @@ -160,7 +160,7 @@ class DuplicateRowTranslator : public exec::Operator::PlanNodeTranslator { }; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; // Fourth, we register the custom plan translator. We're now ready to use our // operator in a query plan. diff --git a/velox/examples/ScanAndSort.cpp b/velox/examples/ScanAndSort.cpp index bb9171d518600..d7ec5838ea632 100644 --- a/velox/examples/ScanAndSort.cpp +++ b/velox/examples/ScanAndSort.cpp @@ -42,7 +42,7 @@ using exec::test::HiveConnectorTestBase; int main(int argc, char** argv) { // Velox Tasks/Operators are based on folly's async framework, so we need to // make sure we initialize it first. - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; // Default memory allocator used throughout this example. auto pool = memory::addDefaultLeafMemoryPool(); diff --git a/velox/examples/ScanOrc.cpp b/velox/examples/ScanOrc.cpp index 238138efd9b2f..69fac4893b053 100644 --- a/velox/examples/ScanOrc.cpp +++ b/velox/examples/ScanOrc.cpp @@ -31,7 +31,7 @@ using namespace facebook::velox::dwrf; // Used to compare the ORC data read by DWRFReader against apache-orc repo. // Usage: velox_example_scan_orc {orc_file_path} int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; if (argc < 2) { return 1; diff --git a/velox/exec/benchmarks/ExchangeBenchmark.cpp b/velox/exec/benchmarks/ExchangeBenchmark.cpp index 7ac8eb2250a83..9ee8e262eca2f 100644 --- a/velox/exec/benchmarks/ExchangeBenchmark.cpp +++ b/velox/exec/benchmarks/ExchangeBenchmark.cpp @@ -331,7 +331,7 @@ BENCHMARK(localFlat10k) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; functions::prestosql::registerAllScalarFunctions(); aggregate::prestosql::registerAllAggregateFunctions(); parse::registerTypeResolver(); diff --git a/velox/exec/benchmarks/FilterProjectBenchmark.cpp b/velox/exec/benchmarks/FilterProjectBenchmark.cpp index fd74c1e8359e0..2ffe70c362909 100644 --- a/velox/exec/benchmarks/FilterProjectBenchmark.cpp +++ b/velox/exec/benchmarks/FilterProjectBenchmark.cpp @@ -266,7 +266,7 @@ class FilterProjectBenchmark : public VectorTestBase { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; functions::prestosql::registerAllScalarFunctions(); aggregate::prestosql::registerAllAggregateFunctions(); parse::registerTypeResolver(); diff --git a/velox/exec/benchmarks/HashTableBenchmark.cpp b/velox/exec/benchmarks/HashTableBenchmark.cpp index e7a8c73c85a22..48be1ebf7dd2d 100644 --- a/velox/exec/benchmarks/HashTableBenchmark.cpp +++ b/velox/exec/benchmarks/HashTableBenchmark.cpp @@ -611,7 +611,7 @@ void combineResults( } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; memory::MmapAllocator::Options options; options.capacity = 10UL << 30; options.useMmapArena = true; diff --git a/velox/exec/benchmarks/MergeBenchmark.cpp b/velox/exec/benchmarks/MergeBenchmark.cpp index e44819e57c8e3..8ee8e9a94678b 100644 --- a/velox/exec/benchmarks/MergeBenchmark.cpp +++ b/velox/exec/benchmarks/MergeBenchmark.cpp @@ -54,7 +54,7 @@ BENCHMARK_RELATIVE(wideArray) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); MergeTestBase test; test.seed(1); diff --git a/velox/exec/benchmarks/RowContainerSortBenchmark.cpp b/velox/exec/benchmarks/RowContainerSortBenchmark.cpp index e6ed246b1993e..56c6ed3879ca7 100644 --- a/velox/exec/benchmarks/RowContainerSortBenchmark.cpp +++ b/velox/exec/benchmarks/RowContainerSortBenchmark.cpp @@ -233,7 +233,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/exec/benchmarks/VectorHasherBenchmark.cpp b/velox/exec/benchmarks/VectorHasherBenchmark.cpp index ea9c6a880f4d2..94c9af06abb12 100644 --- a/velox/exec/benchmarks/VectorHasherBenchmark.cpp +++ b/velox/exec/benchmarks/VectorHasherBenchmark.cpp @@ -239,7 +239,7 @@ BENCHMARK(computeValueIdsLowCardinalityNotAllUsed) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/exec/tests/AggregationFuzzerTest.cpp b/velox/exec/tests/AggregationFuzzerTest.cpp index 1ecdcf960a910..136f8f686dedd 100644 --- a/velox/exec/tests/AggregationFuzzerTest.cpp +++ b/velox/exec/tests/AggregationFuzzerTest.cpp @@ -505,7 +505,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; size_t initialSeed = FLAGS_seed == 0 ? std::time(nullptr) : FLAGS_seed; diff --git a/velox/exec/tests/AggregationRunnerTest.cpp b/velox/exec/tests/AggregationRunnerTest.cpp index 6496f11c50dec..7c4e65bacd6ec 100644 --- a/velox/exec/tests/AggregationRunnerTest.cpp +++ b/velox/exec/tests/AggregationRunnerTest.cpp @@ -66,7 +66,7 @@ static void checkDirForExpectedFiles() { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; if (!FLAGS_aggregation_fuzzer_repro_path.empty()) { checkDirForExpectedFiles(); diff --git a/velox/exec/tests/JoinFuzzerTest.cpp b/velox/exec/tests/JoinFuzzerTest.cpp index 6b51c2a858c81..59d58d3c48347 100644 --- a/velox/exec/tests/JoinFuzzerTest.cpp +++ b/velox/exec/tests/JoinFuzzerTest.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; size_t initialSeed = FLAGS_seed == 0 ? std::time(nullptr) : FLAGS_seed; return JoinFuzzerRunner::run(initialSeed); diff --git a/velox/exec/tests/Main.cpp b/velox/exec/tests/Main.cpp index 164b6422fe828..452787dcfac4c 100644 --- a/velox/exec/tests/Main.cpp +++ b/velox/exec/tests/Main.cpp @@ -24,6 +24,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); // Signal handler required for ThreadDebugInfoTest facebook::velox::process::addDefaultFatalSignalHandler(); - folly::Init init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/exec/tests/SparkAggregationFuzzerTest.cpp b/velox/exec/tests/SparkAggregationFuzzerTest.cpp index 257523bebe01f..373dae1d3355d 100644 --- a/velox/exec/tests/SparkAggregationFuzzerTest.cpp +++ b/velox/exec/tests/SparkAggregationFuzzerTest.cpp @@ -45,7 +45,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; // TODO: List of the functions that at some point crash or fail and need to // be fixed before we can enable. Constant argument of bloom_filter_agg cause diff --git a/velox/exec/tests/VeloxIn10MinDemo.cpp b/velox/exec/tests/VeloxIn10MinDemo.cpp index 47cae22e11dac..627590322cfe8 100644 --- a/velox/exec/tests/VeloxIn10MinDemo.cpp +++ b/velox/exec/tests/VeloxIn10MinDemo.cpp @@ -290,7 +290,7 @@ void VeloxIn10MinDemo::run() { } int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; VeloxIn10MinDemo demo; demo.run(); diff --git a/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp b/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp index 7671d560d9bb1..e35f665dda2b9 100644 --- a/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp +++ b/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; using namespace facebook::velox::codegen; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; CodegenBenchmark benchmark; diff --git a/velox/experimental/gpu/tests/BlockingQueueTest.cu b/velox/experimental/gpu/tests/BlockingQueueTest.cu index e15354f29aeef..45c37075e2f1b 100644 --- a/velox/experimental/gpu/tests/BlockingQueueTest.cu +++ b/velox/experimental/gpu/tests/BlockingQueueTest.cu @@ -281,7 +281,7 @@ void runKernelLaunches() { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; checkDeviceProperties(); runCpuGpuPingPong(); printf("\n"); diff --git a/velox/experimental/gpu/tests/DependencyWatchTest.cu b/velox/experimental/gpu/tests/DependencyWatchTest.cu index f605436d55ce3..0f28726da92ef 100644 --- a/velox/experimental/gpu/tests/DependencyWatchTest.cu +++ b/velox/experimental/gpu/tests/DependencyWatchTest.cu @@ -97,7 +97,7 @@ void schedule(Node* nodes, int size, States* states) { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; Node* nodes; CUDA_CHECK_FATAL(cudaMallocManaged(&nodes, FLAGS_node_count * sizeof(Node))); for (int i = 0; i < FLAGS_node_count; ++i) { diff --git a/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu b/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu index c1005c533108b..6793d6f7820cd 100644 --- a/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu +++ b/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu @@ -197,7 +197,7 @@ void testCudaEvent(int deviceId) { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; int deviceCount; CUDA_CHECK_FATAL(cudaGetDeviceCount(&deviceCount)); printf("Device count: %d\n", deviceCount); diff --git a/velox/experimental/gpu/tests/HashTableTest.cu b/velox/experimental/gpu/tests/HashTableTest.cu index e45bb61d2b203..aa28f5c363b6d 100644 --- a/velox/experimental/gpu/tests/HashTableTest.cu +++ b/velox/experimental/gpu/tests/HashTableTest.cu @@ -745,7 +745,7 @@ void runPartitioned() { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; assert(__builtin_popcount(FLAGS_table_size) == 1); assert(FLAGS_table_size % kBlockSize == 0); CUDA_CHECK_FATAL(cudaSetDevice(FLAGS_device)); diff --git a/velox/experimental/wave/common/tests/CudaTest.cpp b/velox/experimental/wave/common/tests/CudaTest.cpp index 71922a4d8ca4a..e3371822b4fc8 100644 --- a/velox/experimental/wave/common/tests/CudaTest.cpp +++ b/velox/experimental/wave/common/tests/CudaTest.cpp @@ -901,7 +901,7 @@ TEST_F(CudaTest, reduceMatrix) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; if (int device; cudaGetDevice(&device) != cudaSuccess) { LOG(WARNING) << "No CUDA detected, skipping all tests"; return 0; diff --git a/velox/experimental/wave/exec/tests/Main.cpp b/velox/experimental/wave/exec/tests/Main.cpp index 970f35d8180a4..452787dcfac4c 100644 --- a/velox/experimental/wave/exec/tests/Main.cpp +++ b/velox/experimental/wave/exec/tests/Main.cpp @@ -24,6 +24,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); // Signal handler required for ThreadDebugInfoTest facebook::velox::process::addDefaultFatalSignalHandler(); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp index 43ca628703081..83b37decbd2c3 100644 --- a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp +++ b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp @@ -312,7 +312,7 @@ BENCHMARK_MULTI(simpleMinIntegerNullFreeFastPath) { } // namespace facebook::velox::functions int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::functions::CallNullFreeBenchmark benchmark; benchmark.test(); folly::runBenchmarks(); diff --git a/velox/expression/benchmarks/CastBenchmark.cpp b/velox/expression/benchmarks/CastBenchmark.cpp new file mode 100644 index 0000000000000..8a4efb40cd394 --- /dev/null +++ b/velox/expression/benchmarks/CastBenchmark.cpp @@ -0,0 +1,158 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "velox/functions/lib/benchmarks/FunctionBenchmarkBase.h" +#include "velox/vector/fuzzer/VectorFuzzer.h" + +using namespace facebook::velox; + +namespace { +class CastBenchmark : public functions::test::FunctionBenchmarkBase { + public: + CastBenchmark() : FunctionBenchmarkBase() {} + + size_t doRun(const TypePtr& inputType, const TypePtr& outputType) { + folly::BenchmarkSuspender suspender; + std::string colName = "c0"; + auto castInput = + std::make_shared( + inputType, colName); + std::vector expr{ + std::make_shared( + outputType, castInput, false)}; + exec::ExprSet exprSet(expr, &execCtx_); + + facebook::velox::VectorFuzzer fuzzer({}, pool()); + // With encodings, evalMemo can get invoked which does a copy and adds a lot + // of overhead. + auto input = fuzzer.fuzzFlatNotNull(inputType); + auto rowVector = vectorMaker_.rowVector({colName}, {input}); + suspender.dismiss(); + + size_t cnt = 0; + for (auto i = 0; i < 100; i++) { + auto result = evaluate(exprSet, rowVector); + cnt += result->size(); + + // For complex types with lots of children, clearing the result can + // actually consume a lot of resources skewing the result. + suspender.rehire(); + result.reset(); + suspender.dismiss(); + } + + return cnt; + } +}; + +BENCHMARK_MULTI(scalar) { + folly::BenchmarkSuspender suspender; + CastBenchmark benchmark; + suspender.dismiss(); + + return benchmark.doRun(INTEGER(), BIGINT()); +} + +BENCHMARK_MULTI(renameSmallStruct) { + folly::BenchmarkSuspender suspender; + CastBenchmark benchmark; + std::vector oldNames; + std::vector newNames; + std::vector oldTypes; + std::vector newTypes; + for (int i = 0; i < 3; i++) { + oldNames.push_back(""); + newNames.push_back(fmt::format("col{}", i)); + oldTypes.push_back(INTEGER()); + } + newTypes = oldTypes; + suspender.dismiss(); + + return benchmark.doRun( + ROW(std::move(oldNames), std::move(oldTypes)), + ROW(std::move(newNames), std::move(newTypes))); +} + +BENCHMARK_MULTI(renameLargeStruct) { + folly::BenchmarkSuspender suspender; + CastBenchmark benchmark; + std::vector oldNames; + std::vector newNames; + std::vector oldTypes; + std::vector newTypes; + for (int i = 0; i < 1000; i++) { + oldNames.push_back(""); + newNames.push_back(fmt::format("col{}", i)); + oldTypes.push_back(INTEGER()); + } + newTypes = oldTypes; + suspender.dismiss(); + + return benchmark.doRun( + ROW(std::move(oldNames), std::move(oldTypes)), + ROW(std::move(newNames), std::move(newTypes))); +} + +BENCHMARK_MULTI(smallStructNested) { + folly::BenchmarkSuspender suspender; + CastBenchmark benchmark; + std::vector oldNames; + std::vector newNames; + std::vector oldTypes; + std::vector newTypes; + for (int i = 0; i < 3; i++) { + oldNames.push_back(""); + newNames.push_back(fmt::format("col{}", i)); + oldTypes.push_back(INTEGER()); + newTypes.push_back(BIGINT()); + } + suspender.dismiss(); + + return benchmark.doRun( + ROW(std::move(oldNames), std::move(oldTypes)), + ROW(std::move(newNames), std::move(newTypes))); +} + +BENCHMARK_MULTI(largeStructNested) { + folly::BenchmarkSuspender suspender; + CastBenchmark benchmark; + std::vector oldNames; + std::vector newNames; + std::vector oldTypes; + std::vector newTypes; + for (int i = 0; i < 1000; i++) { + oldNames.push_back(""); + newNames.push_back(fmt::format("col{}", i)); + oldTypes.push_back(INTEGER()); + newTypes.push_back(BIGINT()); + } + suspender.dismiss(); + + return benchmark.doRun( + ROW(std::move(oldNames), std::move(oldTypes)), + ROW(std::move(newNames), std::move(newTypes))); +} +} // namespace + +int main(int argc, char** argv) { + folly::Init{&argc, &argv}; + + folly::runBenchmarks(); + return 0; +} diff --git a/velox/expression/benchmarks/TryBenchmark.cpp b/velox/expression/benchmarks/TryBenchmark.cpp index 61e6fed47542a..0502ac2d73ad8 100644 --- a/velox/expression/benchmarks/TryBenchmark.cpp +++ b/velox/expression/benchmarks/TryBenchmark.cpp @@ -185,7 +185,7 @@ BENCHMARK_MULTI(divideAllExceptions) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/expression/benchmarks/VariadicBenchmark.cpp b/velox/expression/benchmarks/VariadicBenchmark.cpp index 1bc058848a9e8..0d815221100d3 100644 --- a/velox/expression/benchmarks/VariadicBenchmark.cpp +++ b/velox/expression/benchmarks/VariadicBenchmark.cpp @@ -194,7 +194,7 @@ BENCHMARK_MULTI(simpleVariadicLotsOfArgs) { } // namespace facebook::velox::functions int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::functions::VariadicBenchmark benchmark; benchmark.test(); folly::runBenchmarks(); diff --git a/velox/expression/tests/ConjunctTest.cpp b/velox/expression/tests/ConjunctTest.cpp index f1706986ef2c1..907153d308631 100644 --- a/velox/expression/tests/ConjunctTest.cpp +++ b/velox/expression/tests/ConjunctTest.cpp @@ -109,6 +109,6 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; return RUN_ALL_TESTS(); } diff --git a/velox/expression/tests/ExpressionFuzzerTest.cpp b/velox/expression/tests/ExpressionFuzzerTest.cpp index 61df1dba943a9..40eb3c7161732 100644 --- a/velox/expression/tests/ExpressionFuzzerTest.cpp +++ b/velox/expression/tests/ExpressionFuzzerTest.cpp @@ -48,7 +48,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; // TODO: List of the functions that at some point crash or fail and need to // be fixed before we can enable. diff --git a/velox/expression/tests/ExpressionRunnerTest.cpp b/velox/expression/tests/ExpressionRunnerTest.cpp index 08e976af4a579..1916cbfb03b50 100644 --- a/velox/expression/tests/ExpressionRunnerTest.cpp +++ b/velox/expression/tests/ExpressionRunnerTest.cpp @@ -165,7 +165,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; if (!FLAGS_fuzzer_repro_path.empty()) { checkDirForExpectedFiles(); diff --git a/velox/expression/tests/SparkExpressionFuzzerTest.cpp b/velox/expression/tests/SparkExpressionFuzzerTest.cpp index 84254b66b1d76..0bd0dbe6eca7e 100644 --- a/velox/expression/tests/SparkExpressionFuzzerTest.cpp +++ b/velox/expression/tests/SparkExpressionFuzzerTest.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv) { // Calls common init functions in the necessary order, initializing // singletons, installing proper signal handlers for better debugging // experience, and initialize glog and gflags. - folly::Init init(&argc, &argv); + folly::Init{&argc, &argv}; // The following list are the Spark UDFs that hit issues // For rlike you need the following combo in the only list: diff --git a/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp b/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp index b9dd530d822f5..72b42c3dcd50a 100644 --- a/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp +++ b/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp @@ -115,7 +115,7 @@ BENCHMARK_NAMED_PARAM(merge, capacity2048, 1e6, 2048) } // namespace facebook::velox::functions int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp b/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp index 2b78ec7edf80d..5f3fc48cc4a3c 100644 --- a/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp +++ b/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp @@ -188,7 +188,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM(mergeKllSketch, 1e6x80, 1e6, 80); } // namespace facebook::velox::functions::kll::test int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp b/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp index 99fce0c412542..26e3dd6620886 100644 --- a/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp +++ b/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp @@ -103,7 +103,7 @@ void registerRe2Functions() { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::functions::test::registerRe2Functions(); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp index cfe770bdcb801..160f0f7195c81 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp @@ -268,7 +268,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; benchmark = std::make_unique(); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/aggregates/tests/Main.cpp b/velox/functions/prestosql/aggregates/tests/Main.cpp index 3b55575663ed0..3ab9aed5dd99a 100644 --- a/velox/functions/prestosql/aggregates/tests/Main.cpp +++ b/velox/functions/prestosql/aggregates/tests/Main.cpp @@ -18,6 +18,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::Init init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp index 3d452e1d9b3e0..f2d6d5b291074 100644 --- a/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp @@ -67,7 +67,7 @@ VELOX_UDF_END(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction< diff --git a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp index e3249b41d0002..c8303da52abb4 100644 --- a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp @@ -46,7 +46,7 @@ void registerTestSimpleFunctions() { using namespace facebook::velox; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); functions::registerTestVectorFunctionBasic(); diff --git a/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp index 81cb138c65247..7b1ac51fbcae1 100644 --- a/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp @@ -222,7 +222,7 @@ BENCHMARK_RELATIVE(vectorBasicIntegerWithInstance) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp index 4b649cd55fa40..f9a935c10eda2 100644 --- a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp @@ -27,7 +27,7 @@ using namespace facebook::velox::exec; using namespace facebook::velox::functions; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction>( diff --git a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp index 191ec5c1b48fb..237a015e4be24 100644 --- a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp @@ -275,7 +275,7 @@ BENCHMARK_MULTI(std_reference) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::exec::ArrayWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp b/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp index 712441e7e2a96..81ad9b9ab7dd0 100644 --- a/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp @@ -154,7 +154,7 @@ BENCHMARK_RELATIVE(bitwise_shift_left) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp index 99c7f84d21d04..51039d772ba13 100644 --- a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp @@ -238,7 +238,7 @@ BENCHMARK(vectorConditional) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp index 49c1e790c3bee..96c40dbf4b4fe 100644 --- a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp @@ -180,7 +180,7 @@ BENCHMARK_MULTI(Gt_Velox) { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp index 4331b986e10b8..efd1bc7b19a4b 100644 --- a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp @@ -109,7 +109,7 @@ BENCHMARK_RELATIVE(simd_tinyint_eq) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp index 56b0ee058ba5c..0d7491eff8dfe 100644 --- a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp @@ -137,7 +137,7 @@ BENCHMARK_MULTI(flattenAndConstantFold, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp index 4348e99a81459..7cf545032d7c5 100644 --- a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp @@ -200,7 +200,7 @@ BENCHMARK(second) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/InBenchmark.cpp b/velox/functions/prestosql/benchmarks/InBenchmark.cpp index 7f39553490580..aa644cf00691e 100644 --- a/velox/functions/prestosql/benchmarks/InBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/InBenchmark.cpp @@ -129,7 +129,7 @@ BENCHMARK_RELATIVE(in1K) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp index b798c2640f9e4..d6e7535f09359 100644 --- a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp @@ -474,7 +474,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::functions::prestosql int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp index 01e718f8895ff..d62bd66bc15d0 100644 --- a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp @@ -83,7 +83,7 @@ BENCHMARK_MULTI(flatKeys, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp index c657949681f80..8e95258f52744 100644 --- a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp @@ -434,7 +434,7 @@ BENCHMARK_RELATIVE(nestedMapSumVectorFunctionMapView) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; MapInputBenchmark benchmark; if (benchmark.testMapSum() && benchmark.testNestedMapSum()) { diff --git a/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp b/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp index 5660439b9cbd0..c0ad9aa295756 100644 --- a/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp +++ b/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp @@ -255,7 +255,7 @@ BENCHMARK(simple_general, n) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::exec::MapWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp index c4ec34fc83658..37006b5c07b71 100644 --- a/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp @@ -123,7 +123,7 @@ BENCHMARK_MULTI(dictionaryKeys, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp index 798990bbef7ca..62802b65c20f8 100644 --- a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp @@ -194,7 +194,7 @@ BENCHMARK_MULTI(simple) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::exec::NestedArrayWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/NotBenchmark.cpp b/velox/functions/prestosql/benchmarks/NotBenchmark.cpp index 236b5cd34bebe..8004918fea912 100644 --- a/velox/functions/prestosql/benchmarks/NotBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/NotBenchmark.cpp @@ -79,7 +79,7 @@ BENCHMARK_RELATIVE(vectorizedNot) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/Row.cpp b/velox/functions/prestosql/benchmarks/Row.cpp index 5118c6eb821d0..1cd429f6d9c0d 100644 --- a/velox/functions/prestosql/benchmarks/Row.cpp +++ b/velox/functions/prestosql/benchmarks/Row.cpp @@ -73,7 +73,7 @@ BENCHMARK(copyMostlyConst) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp index 67b897b272a9a..2e521db7797ab 100644 --- a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp @@ -220,7 +220,7 @@ BENCHMARK_MULTI(complex_row) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::exec::RowWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp b/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp index 12b526fef848f..83f37e5dd0df5 100644 --- a/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp @@ -352,7 +352,7 @@ BENCHMARK(ArraySubscript_ArrayRowIntInt) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; benchmark = std::make_unique(); benchmark->test(); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp b/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp index e23b4c46b5a07..4e85096751ef3 100644 --- a/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp +++ b/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp @@ -185,7 +185,7 @@ BENCHMARK_RELATIVE(aciiRPad) { // asciiUpper 98.22% 68.98ms 14.50 //============================================================================ int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp index 41ff095d2c875..504da0b3c0865 100644 --- a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp @@ -178,7 +178,7 @@ BENCHMARK_MULTI(array_of_string) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::exec::StringWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/URLBenchmark.cpp b/velox/functions/prestosql/benchmarks/URLBenchmark.cpp index 94cfe57641360..9f9e58ad9eca0 100644 --- a/velox/functions/prestosql/benchmarks/URLBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/URLBenchmark.cpp @@ -300,7 +300,7 @@ BENCHMARK_RELATIVE(velox_param) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp index c7be659c4b20a..8a7109b4b0d30 100644 --- a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp @@ -111,7 +111,7 @@ BENCHMARK_RELATIVE(widthBucket) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp index 33fb428db37f0..655f11d613571 100644 --- a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp @@ -111,7 +111,7 @@ BENCHMARK_MULTI(NeqSizeFlatFlat) { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp index fe54035de2de3..1eff0e0799d00 100644 --- a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp @@ -136,7 +136,7 @@ BENCHMARK_MULTI(fast, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/window/tests/Main.cpp b/velox/functions/prestosql/window/tests/Main.cpp index 3b55575663ed0..3ab9aed5dd99a 100644 --- a/velox/functions/prestosql/window/tests/Main.cpp +++ b/velox/functions/prestosql/window/tests/Main.cpp @@ -18,6 +18,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::Init init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/functions/remote/client/tests/RemoteFunctionTest.cpp b/velox/functions/remote/client/tests/RemoteFunctionTest.cpp index 9f22afca793d0..df7a110bf5bc5 100644 --- a/velox/functions/remote/client/tests/RemoteFunctionTest.cpp +++ b/velox/functions/remote/client/tests/RemoteFunctionTest.cpp @@ -180,6 +180,6 @@ VELOX_INSTANTIATE_TEST_SUITE_P( int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/functions/remote/server/RemoteFunctionServiceMain.cpp b/velox/functions/remote/server/RemoteFunctionServiceMain.cpp index 85999b7b13c49..1cb82eab7b573 100644 --- a/velox/functions/remote/server/RemoteFunctionServiceMain.cpp +++ b/velox/functions/remote/server/RemoteFunctionServiceMain.cpp @@ -43,7 +43,7 @@ using namespace ::facebook::velox; using ::apache::thrift::ThriftServer; int main(int argc, char* argv[]) { - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; FLAGS_logtostderr = true; // Always registers all Presto functions and make them available under a diff --git a/velox/functions/sparksql/aggregates/tests/Main.cpp b/velox/functions/sparksql/aggregates/tests/Main.cpp index 684d28a087971..3ab9aed5dd99a 100644 --- a/velox/functions/sparksql/aggregates/tests/Main.cpp +++ b/velox/functions/sparksql/aggregates/tests/Main.cpp @@ -18,6 +18,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/functions/sparksql/benchmarks/In.cpp b/velox/functions/sparksql/benchmarks/In.cpp index bfe7ad39faabd..539dc18a51ec6 100644 --- a/velox/functions/sparksql/benchmarks/In.cpp +++ b/velox/functions/sparksql/benchmarks/In.cpp @@ -124,7 +124,7 @@ void registerInFunctions() { } // namespace facebook::velox::functions::sparksql int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; facebook::velox::functions::registerPrestoIn(); facebook::velox::functions::sparksql::registerInFunctions(); facebook::velox::functions::registerArrayConstructor(); diff --git a/velox/functions/sparksql/window/tests/Main.cpp b/velox/functions/sparksql/window/tests/Main.cpp index 684d28a087971..3ab9aed5dd99a 100644 --- a/velox/functions/sparksql/window/tests/Main.cpp +++ b/velox/functions/sparksql/window/tests/Main.cpp @@ -18,6 +18,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp index 679feac385af3..d026595712b8f 100644 --- a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp +++ b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp @@ -173,7 +173,7 @@ BENCHMARK_NAMED_PARAM_MULTI( } // namespace facebook::spark::benchmarks int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp b/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp index 369aef41025fc..b68d2922aff7e 100644 --- a/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp +++ b/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp @@ -298,7 +298,7 @@ SERDE_BENCHMARKS( } // namespace facebook::velox::row int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp b/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp index 37806134e9137..8ad221bb3c645 100644 --- a/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp +++ b/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp @@ -509,6 +509,6 @@ TEST_F(VeloxSubstraitRoundTripTest, dateType) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/tpch/gen/tests/TpchGenTest.cpp b/velox/tpch/gen/tests/TpchGenTest.cpp index c172ee21ff623..cb8ae6d8b60e5 100644 --- a/velox/tpch/gen/tests/TpchGenTest.cpp +++ b/velox/tpch/gen/tests/TpchGenTest.cpp @@ -822,6 +822,6 @@ TEST_F(TpchGenTestCustomerTest, reproducible) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/type/tests/FilterBenchmark.cpp b/velox/type/tests/FilterBenchmark.cpp index ead694fe61dcb..be36bf80c9762 100644 --- a/velox/type/tests/FilterBenchmark.cpp +++ b/velox/type/tests/FilterBenchmark.cpp @@ -70,7 +70,7 @@ BENCHMARK_RELATIVE(simdSparse) { int32_t main(int32_t argc, char* argv[]) { constexpr int32_t kNumValues = 1000000; constexpr int32_t kFilterValues = 1000; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; std::vector filterValues; filterValues.reserve(kFilterValues); diff --git a/velox/type/tests/NegatedBigintRangeBenchmark.cpp b/velox/type/tests/NegatedBigintRangeBenchmark.cpp index 4c4c4369de0d2..14b0cd4da1036 100644 --- a/velox/type/tests/NegatedBigintRangeBenchmark.cpp +++ b/velox/type/tests/NegatedBigintRangeBenchmark.cpp @@ -118,7 +118,7 @@ DEFINE_RANGE_BENCHMARKS(9000) DEFINE_RANGE_BENCHMARKS(9900) int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; constexpr int32_t kNumValues = 1000000; constexpr int64_t distinctVals = 20001; // -10000 to 10000 const std::vector pctZeros = {0, 1, 5, 10, 50, 90, 95, 99, 100}; diff --git a/velox/type/tests/NegatedBytesRangeBenchmark.cpp b/velox/type/tests/NegatedBytesRangeBenchmark.cpp index fe0a0d0b5cbb0..19a0fb8ef8407 100644 --- a/velox/type/tests/NegatedBytesRangeBenchmark.cpp +++ b/velox/type/tests/NegatedBytesRangeBenchmark.cpp @@ -129,7 +129,7 @@ DEFINE_BENCHMARKS(100, 94) DEFINE_BENCHMARKS(100, 98) int32_t main(int32_t argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; constexpr int32_t kNumValues = 1000000; constexpr int32_t kStringPoolSize = 20000; const std::vector stringLengths = {2, 3, 5, 10, 100}; diff --git a/velox/type/tests/NegatedBytesValuesBenchmark.cpp b/velox/type/tests/NegatedBytesValuesBenchmark.cpp index 3217e6c316f8d..6fc810ba60781 100644 --- a/velox/type/tests/NegatedBytesValuesBenchmark.cpp +++ b/velox/type/tests/NegatedBytesValuesBenchmark.cpp @@ -121,7 +121,7 @@ DEFINE_BENCHMARKS(100, 1000) DEFINE_BENCHMARKS(100, 10000) int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; constexpr int32_t k_num_values = 1000000; constexpr int32_t k_string_pool_size = 20000; const std::vector string_lengths = {1, 2, 5, 10, 100}; diff --git a/velox/type/tests/NegatedValuesFilterBenchmark.cpp b/velox/type/tests/NegatedValuesFilterBenchmark.cpp index b613911cc24f1..ee85cf7be77c9 100644 --- a/velox/type/tests/NegatedValuesFilterBenchmark.cpp +++ b/velox/type/tests/NegatedValuesFilterBenchmark.cpp @@ -125,7 +125,7 @@ int32_t main(int32_t argc, char* argv[]) { 1000, 1000, 10000, 10, 1000, 1000, 1000}; std::vector> rejectedValues; - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; rejectedValues.reserve(kFilterSizes.size()); for (auto i = 0; i < kFilterSizes.size(); ++i) { diff --git a/velox/type/tests/StringViewBenchmark.cpp b/velox/type/tests/StringViewBenchmark.cpp index d4cb5e63423c6..f0a46014c7568 100644 --- a/velox/type/tests/StringViewBenchmark.cpp +++ b/velox/type/tests/StringViewBenchmark.cpp @@ -53,7 +53,7 @@ BENCHMARK_PARAM(runStringViewCreate, NON_INLINE_SIZE); } // namespace facebook::velox int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/CopyBenchmark.cpp b/velox/vector/benchmarks/CopyBenchmark.cpp index d021db3482ad8..caa38ff732834 100644 --- a/velox/vector/benchmarks/CopyBenchmark.cpp +++ b/velox/vector/benchmarks/CopyBenchmark.cpp @@ -351,7 +351,7 @@ BENCHMARK_MULTI(copyStructNonContiguous) { } // namespace facebook::velox int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/vector/benchmarks/NthBitBenchmark.cpp b/velox/vector/benchmarks/NthBitBenchmark.cpp index d6a4043c53b59..2020ff2af8188 100644 --- a/velox/vector/benchmarks/NthBitBenchmark.cpp +++ b/velox/vector/benchmarks/NthBitBenchmark.cpp @@ -117,7 +117,7 @@ BENCHMARK_RELATIVE_PARAM(BM_setNthBit_shift_false_unsigned, 1000000); BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp index a2678843b6a08..3ac27ce1b7433 100644 --- a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp +++ b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp @@ -308,7 +308,7 @@ BENCHMARK_DRAW_LINE(); // buck run @mode/opt-clang-thinlto \ // velox/vector/benchmarks:selectivity_vector_benchmark int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp index e4f36d0f77b68..9307b4c43f730 100644 --- a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp +++ b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp @@ -467,7 +467,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init{&argc, &argv}; folly::runBenchmarks(); return 0; }