zhuqi-lucas commented on code in PR #19042: URL: https://github.com/apache/datafusion/pull/19042#discussion_r2581507269
########## benchmarks/sort_clickbench.py: ########## @@ -0,0 +1,253 @@ +#!/usr/bin/env python3 + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +#!/usr/bin/env python3 +""" +Sort ClickBench data by EventTime for reverse scan benchmark. +Enhanced version with configurable row group size and optimization options. +""" + +import sys +import argparse +from pathlib import Path + +try: + import pyarrow.parquet as pq + import pyarrow.compute as pc +except ImportError: + print("Error: pyarrow is not installed.") + print("Please install it with: pip install pyarrow") + sys.exit(1) + + +def sort_clickbench_data( + input_path: str, + output_path: str, + row_group_size: int = 1024 * 1024, # 1M rows default Review Comment: And we already passed 64k above, but better to make it consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
