Skip to content

CI: Disable SQLLogic job#68654

Merged
maxknv merged 2 commits intomasterfrom
ci_fix_sqllogic
Aug 23, 2024
Merged

CI: Disable SQLLogic job#68654
maxknv merged 2 commits intomasterfrom
ci_fix_sqllogic

Conversation

@maxknv
Copy link
Copy Markdown
Member

@maxknv maxknv commented Aug 21, 2024

First part of the job called "self-test" fails with sqlglot parser exception:
2024-08-22 16:16:20 Traceback (most recent call last): 2024-08-22 16:16:20 File "/repo/tests/sqllogic/runner.py", line 497, in <module> 2024-08-22 16:16:20 main() 2024-08-22 16:16:20 File "/repo/tests/sqllogic/runner.py", line 493, in main 2024-08-22 16:16:20 args.func(args) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/runner.py", line 409, in calle 2024-08-22 16:16:20 runner.run_all_tests_from_dir(self_test_dir) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_runner.py", line 570, in run_all_tests_from_dir 2024-08-22 16:16:20 self.run_all_tests_from_file(file_path, self._input_dir) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_runner.py", line 563, in run_all_tests_from_file 2024-08-22 16:16:20 self.run_one_test(stream, test_name, test_file) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_runner.py", line 543, in run_one_test 2024-08-22 16:16:20 for status in self.__statuses(parser, out_stream): 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_runner.py", line 344, in __statuses 2024-08-22 16:16:20 for block in parser.test_blocks(): 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_parser.py", line 446, in test_blocks 2024-08-22 16:16:20 yield from self._iterate_blocks() 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_parser.py", line 437, in _iterate_blocks 2024-08-22 16:16:20 yield FileBlockBase.parse_block(self, prev, i) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_parser.py", line 213, in parse_block 2024-08-22 16:16:20 request = FileBlockBase.convert_request(request) 2024-08-22 16:16:20 File "/repo/tests/sqllogic/test_parser.py", line 145, in convert_request 2024-08-22 16:16:20 result = sqlglot.transpile(sql, read="sqlite", write="clickhouse")[0] 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/__init__.py", line 177, in transpile 2024-08-22 16:16:20 for expression in parse(sql, read, error_level=error_level) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/__init__.py", line 102, in parse 2024-08-22 16:16:20 return Dialect.get_or_raise(read or dialect).parse(sql, **opts) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/dialects/dialect.py", line 512, in parse 2024-08-22 16:16:20 return self.parser(**opts).parse(self.tokenize(sql), sql) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1234, in parse 2024-08-22 16:16:20 return self._parse( 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1303, in _parse 2024-08-22 16:16:20 expressions.append(parse_method(self)) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1532, in _parse_statement 2024-08-22 16:16:20 return self.STATEMENT_PARSERS[self._prev.token_type](self) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 667, in <lambda> 2024-08-22 16:16:20 TokenType.CREATE: lambda self: self._parse_create(), 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1676, in _parse_create 2024-08-22 16:16:20 extend_props(self._parse_properties()) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1862, in _parse_properties 2024-08-22 16:16:20 prop = self._parse_property() 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1802, in _parse_property 2024-08-22 16:16:20 return self.PROPERTY_PARSERS[self._prev.text.upper()](self) 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 837, in <lambda> 2024-08-22 16:16:20 "PRIMARY KEY": lambda self: self._parse_primary_key(in_props=True), 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 5033, in _parse_primary_key 2024-08-22 16:16:20 expressions = self._parse_wrapped_csv( 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 5834, in _parse_wrapped_csv 2024-08-22 16:16:20 return self._parse_wrapped( 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 5841, in _parse_wrapped 2024-08-22 16:16:20 self.raise_error("Expecting (") 2024-08-22 16:16:20 File "/usr/local/lib/python3.10/dist-packages/sqlglot/parser.py", line 1347, in raise_error 2024-08-22 16:16:20 raise error 2024-08-22 16:16:20 sqlglot.errors.ParseError: Expecting (. Line 1, Col: 76. 2024-08-22 16:16:20 CREATE TABLE t1(a INTEGER, b INTEGER) ENGINE = MergeTree() PRIMARY KEY tuple()

second part of the job fails with timeout:

024-08-19T12:08:36.9107226Z + /clickhouse-tests/sqllogic/runner.py --log-file /test_output/runner-complete-test.log --log-level info complete-test --input-dir /sqllogictest --out-dir /test_output/complete-test
2024-08-19T12:08:36.9110042Z + ts '%Y-%m-%d %H:%M:%S'
2024-08-19T14:27:49.6759170Z + echo 'timeout reached'
2024-08-19T14:27:49.6773691Z timeout reached

wasting 2h of runtime

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

CI Settings (Only check the boxes if you know what you are doing):

  • Allow: All Required Checks
  • Allow: SQLlogic
  • Allow: Stateful tests
  • Allow: Integration Tests
  • Allow: Performance tests
  • Allow: All Builds
  • Allow: batch 1, 2 for multi-batch jobs
  • Allow: batch 3, 4, 5, 6 for multi-batch jobs

  • Exclude: Style check
  • Exclude: Fast test
  • Exclude: All with ASAN
  • Exclude: All with TSAN, MSAN, UBSAN, Coverage
  • Exclude: All with aarch64, release, debug

  • Run only fuzzers related jobs (libFuzzer fuzzers, AST fuzzers, etc.)
  • Exclude: AST fuzzers

  • Do not test
  • Woolen Wolfdog
  • Upload binaries for special builds
  • Disable merge-commit
  • Disable CI cache

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 21, 2024
@robot-ch-test-poll2
Copy link
Copy Markdown
Contributor

robot-ch-test-poll2 commented Aug 21, 2024

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

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

Successful checks
Check nameDescriptionStatus
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

@maxknv maxknv marked this pull request as draft August 21, 2024 19:27
@maxknv maxknv changed the title CI: SQLLogix job fix CI: SQLLogic job fix Aug 21, 2024
@maxknv maxknv changed the title CI: SQLLogic job fix CI: Disable SQLLogic Aug 22, 2024
@maxknv maxknv changed the title CI: Disable SQLLogic CI: Disable SQLLogic job Aug 22, 2024
@maxknv maxknv marked this pull request as ready for review August 22, 2024 16:21
@maxknv maxknv enabled auto-merge August 23, 2024 09:11
@maxknv maxknv added this pull request to the merge queue Aug 23, 2024
Merged via the queue into master with commit 894bbbf Aug 23, 2024
@maxknv maxknv deleted the ci_fix_sqllogic branch August 23, 2024 09:46
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 23, 2024
@maxknv maxknv added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Aug 23, 2024
robot-clickhouse-ci-1 added a commit that referenced this pull request Aug 23, 2024
Backport #68654 to 24.8: CI: Disable SQLLogic job
@robot-clickhouse robot-clickhouse added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 23, 2024
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created-cloud deprecated label, NOOP label Aug 23, 2024
alexey-milovidov added a commit that referenced this pull request Feb 21, 2026
The SQLLogic test (`tests/sqllogic/`) runs the sqllogictest corpus against
ClickHouse, comparing results with SQLite as a reference. It was disabled
in Aug 2024 (PR #68654) due to an unhandled `sqlglot` parse error, and the
CI infrastructure was deleted in Mar 2025.

This change:

- Fixes `sqlglot` crashes in `test_parser.py` by wrapping both the
  CREATE TABLE transpilation and the CAST/NULL transformation paths in
  `try/except`, falling back to original SQL on failure

- Replaces the ODBC dependency with the native `clickhouse_driver.dbapi`
  driver (already available in the Docker image), adding a `NATIVE` engine
  to `connection.py` with `NativeConnectingArgs`

- Updates `runner.py` to use the `NATIVE` engine instead of `ODBC`

- Adds `sqlglot` and `deepdiff` to `ci/docker/stateless-test/requirements.txt`

- Creates `ci/jobs/sqllogic_test.py` CI job script that clones the
  sqllogictest repo, then runs self-test, statements-test, and complete-test

- Wires the new `SQLLogic test` job into the Praktika CI master workflow

- Updates `canonic_report.json` to match new driver and `sqlglot` version behavior

Changelog category: CI Fix or improvement
Changelog entry: Resurrect SQLLogic test in CI, replacing ODBC with native driver

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants