Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40197

ClickBench's Q43 with datetime doesnot work

    XMLWordPrintable

Details

    • Not for Release Notes
    • Hide
      The original function is PG-specific and workaround is to re-write query 43.
      Here is an example.
      Show
      The original function is PG-specific and workaround is to re-write query 43. Here is an example.

    Description

      get source code:
      #git clone -b bb-11.4-duckdb-jemalloc https://github.com/drrtuy/mdb-server.git
      #cd mdb-server
      #git clone --recurse-submodules https://github.com/MariaDB/duckdb-engine storage/duckdb/duckdb
      #./storage/duckdb/duckdb/build.sh -D

      (if you hit cryto related issue, hack
      #sed -i 's/libxcrypt-dev/libcrypt-dev/g' /test-data/clones/mdb-server/storage/duckdb/duckdb/build.sh)

      ./storage/duckdb/duckdb/build.sh -S -t RelWithDebInfo or refer ./storage/duckdb/duckdb/build.sh -h

      got to build folder and pack build
      #cd /test-data/clones/DuckdbBuildOf_mdb-server
      #cpack

      refer: https://github.com/MariaDB/duckdb-engine – for building

      clickbench path:
      https://github.com/ClickHouse/ClickBench/tree/main

      1. I order to just run q43 and remove others , in queries.sql
      2. comment 'bench_concurrent_qps' in /lib/benchmark-common.sh to run just queries no concurrent test
      3. set BENCH_TRIES=1 in benchmark.sh

      I am attaching SOP of running clickbench.

      Error we get
      ERROR 1296 (HY000) at line 1: Got error 122 'Catalog Error: Scalar Function with name date_format does not exist!
      Did you mean "date_part"?

      LINE 1: ... '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_FORMAT(EventTime, '%Y-%m-' from DuckDB
      --------------
      SELECT DATE_FORMAT(EventTime, '%Y-%m-%d %H:00:00') AS M, COUNT AS PageViews FROM hits WHERE CounterID = 62 AND EventDate >= '2013-07-14' AND EventDate <= '2013-07-15' AND IsRefresh = 0 AND DontCountHits = 0 GROUP BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:00:00') ORDER BY DATE_FORMAT(EventTime, '%Y-%m-%d %H:00:00') LIMIT 10 OFFSET 1000
      --------------

      Attachments

        Activity

          People

            drrtuy Roman
            amroo76 Amrendra Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.