martin-g commented on code in PR #22807:
URL: https://github.com/apache/datafusion/pull/22807#discussion_r3372406448


##########
benchmarks/sql_benchmarks/clickbench_sorted/init/load.sql:
##########
@@ -0,0 +1,8 @@
+# Run benchmark with prefer_existing_sort configuration
+# This allows DataFusion to optimize away redundant sorts while maintaining 
parallelism

Review Comment:
   ```suggestion
   -- Run benchmark with prefer_existing_sort configuration
   -- This allows DataFusion to optimize away redundant sorts while maintaining 
parallelism
   ```
   SQL single-line comments



##########
benchmarks/sql_benchmarks/clickbench_sorted/init/load.sql:
##########
@@ -0,0 +1,8 @@
+# Run benchmark with prefer_existing_sort configuration
+# This allows DataFusion to optimize away redundant sorts while maintaining 
parallelism
+
+set datafusion.optimizer.prefer_existing_sort=true
+
+CREATE EXTERNAL TABLE hits_raw STORED AS PARQUET LOCATION 
'${DATA_DIR:-data}/hits_sorted.parquet' WITH ORDER ("${SORTED_BY:-EventTime}" 
${SORTED_ORDER:-ASC});
+
+CREATE VIEW hits AS SELECT * EXCEPT ("EventDate"), CAST(CAST("EventDate" AS 
INTEGER) AS DATE) AS "EventDate" FROM hits_raw;

Review Comment:
   ```suggestion
   CREATE VIEW hits AS SELECT * EXCEPT ("EventDate"), CAST(CAST("EventDate" AS 
INTEGER) AS DATE) AS "EventDate" FROM hits_raw;
   
   ```



##########
benchmarks/sql_benchmarks/clickbench_sorted/init/load.sql:
##########
@@ -0,0 +1,8 @@
+# Run benchmark with prefer_existing_sort configuration
+# This allows DataFusion to optimize away redundant sorts while maintaining 
parallelism
+
+set datafusion.optimizer.prefer_existing_sort=true

Review Comment:
   ```suggestion
   set datafusion.optimizer.prefer_existing_sort=true;
   ```



-- 
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]

Reply via email to