ClickHouse icon indicating copy to clipboard operation
ClickHouse copied to clipboard

Add function printf for spark compatiability

Open taiyang-li opened this issue 1 year ago • 3 comments

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Add function printf for spark compatiability

SELECT printf('%%%s %s %d', 'Hello', 'World', 2024)

Query id: 293631ab-3d21-4139-958d-715ce697da95

   ┌─printf('%%%s %s %d', 'Hello', 'World', 2024)─┐
1. │ %Hello World 2024                            │
   └──────────────────────────────────────────────┘

1 row in set. Elapsed: 0.002 sec. 

taiyang-li avatar Jul 09 '24 09:07 taiyang-li

This is an automated comment for commit 1103a2d669b9aadc55b381ec25cd8763a2bde8c2 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

robot-clickhouse-ci-1 avatar Jul 09 '24 09:07 robot-clickhouse-ci-1

Style check — Check style failed. Details

Let's rename test to 03203_function_printf

vdimir avatar Jul 10 '24 09:07 vdimir

@vdimir @den-crane it seems that almost all tests had passed, do you have any further reviews?

taiyang-li avatar Aug 02 '24 02:08 taiyang-li

Stateless tests (tsan, s3 storage) [2/4] — fail: 1, passed: 1705, skipped: 42 Details

67732

vdimir avatar Aug 05 '24 09:08 vdimir

@taiyang-li @vdimir I've noticed this one doesn't support special characters. For example: select printf('%%s: %s', '\n\t'); returns \n\t Is it expected, or is a bug?

max-vostrikov avatar Sep 18 '24 14:09 max-vostrikov

@taiyang-li @vdimir I've noticed this one doesn't support special characters. For example: select printf('%%s: %s', '\n\t'); returns \n\t Is it expected, or is a bug?

Strange.. I can't reproduce it. I'm on x86 platform

SELECT printf('%%s: %s', '\n\t')

Query id: 0348d69c-d10d-4476-b6ca-c6a6d852d3ca

   ┌─printf('%%s: %s', '\n\t')─┐
1. │ %s: 
                            │
   └───────────────────────────┘

taiyang-li avatar Sep 18 '24 14:09 taiyang-li

@taiyang-li Yes, I got it. It was client issue, not a printf issue

max-vostrikov avatar Sep 18 '24 15:09 max-vostrikov