alamb commented on code in PR #6836: URL: https://github.com/apache/arrow-datafusion/pull/6836#discussion_r1251239537
########## datafusion/core/tests/sqllogictests/test_files/clickbench.slt: ########## @@ -0,0 +1,270 @@ +# 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. + + +# This file contains the clickbench schema and queries +# and the first 10 rows of data. Since ClickBench contains case sensitive queries +# this is also a good test of that usecase too + +# create.sql came from +# https://github.com/ClickHouse/ClickBench/blob/8b9e3aa05ea18afa427f14909ddc678b8ef0d5e6/datafusion/create.sql +# Data file made with DuckDB: +# COPY (SELECT * FROM 'hits.parquet' LIMIT 10) TO 'clickbench_hits_10.parqet' (FORMAT PARQUET); + +statement ok +CREATE EXTERNAL TABLE hits +STORED AS PARQUET +LOCATION 'tests/data/clickbench_hits_10.parqet'; + + +# queries.sql came from +# https://github.com/ClickHouse/ClickBench/blob/8b9e3aa05ea18afa427f14909ddc678b8ef0d5e6/datafusion/queries.sql + +query I +SELECT COUNT(*) FROM hits; +---- +10 + +query I +SELECT COUNT(*) FROM hits WHERE "AdvEngineID" <> 0; +---- +0 + +query IIR +SELECT SUM("AdvEngineID"), COUNT(*), AVG("ResolutionWidth") FROM hits; +---- +0 10 0 + +query R +SELECT AVG("UserID") FROM hits; +---- +-304548765855551600 + +query I +SELECT COUNT(DISTINCT "UserID") FROM hits; +---- +5 + +query I +SELECT COUNT(DISTINCT "SearchPhrase") FROM hits; +---- +1 + +query DD +SELECT MIN("EventDate"::INT::DATE), MAX("EventDate"::INT::DATE) FROM hits; +---- +2013-07-15 2013-07-15 + +query II +SELECT "AdvEngineID", COUNT(*) FROM hits WHERE "AdvEngineID" <> 0 GROUP BY "AdvEngineID" ORDER BY COUNT(*) DESC; +---- + +# https://github.com/apache/arrow-datafusion/issues/6790 Review Comment: These are fixed by https://github.com/apache/arrow-datafusion/pull/6827 -- 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]
