Skip to content

ASTLiteral support custom type - #64562

Merged
alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
bigo-sg:literal
Jun 4, 2024
Merged

alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
bigo-sg:literal

Conversation

@shuai-xu

@shuai-xu shuai-xu commented May 29, 2024 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Not for changelog

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

Add support for custom type to ASTLiteral, or else the type may be lost when parse the ast. E.g. set a ASTLiteral to DataTime32 with value 19870, then it will be parsed to Int16.

@nikitamikhaylov

Copy link
Copy Markdown
Member

Tests?

@shuai-xu

Copy link
Copy Markdown
Contributor Author

Tests?

done, add unit tests

@alexey-milovidov alexey-milovidov changed the title ASTLiteral support custon type ASTLiteral support custom type Jun 2, 2024
@alexey-milovidov

Copy link
Copy Markdown
Member

What does it change for the user?

@shuai-xu

shuai-xu commented Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

What does it change for the user?

This change is for gluten, which use clickhouse as native engine for spark. When it pass a date to clickhouse, the date is parsed to int, this may cause an exception.

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jun 3, 2024
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 3, 2024
@robot-clickhouse-ci-1

robot-clickhouse-ci-1 commented Jun 3, 2024 •

Copy link
Copy Markdown
Contributor

This is an automated comment for commit 8c62bde 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
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR⏳ pending
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Successful checks
Check nameDescriptionStatus
A SyncIf it fails, ask a maintainer for help✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ 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
Mergeable CheckChecks if all other necessary checks are successful✅ success
PR CheckThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ 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

@alexey-milovidov

Copy link
Copy Markdown
Member

Needs a comment that the class member and the method are required for Gluten.

@alexey-milovidov alexey-milovidov self-assigned this Jun 3, 2024
@shuai-xu

shuai-xu commented Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

Needs a comment that the class member and the method are required for Gluten.

done

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jun 4, 2024
Merged via the queue into ClickHouse:master with commit f4d1f60 Jun 4, 2024
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 4, 2024
liuneng1994 pushed a commit to apache/gluten that referenced this pull request Jun 7, 2024
What changes were proposed in this pull request?
This pr based on ClickHouse/ClickHouse#64562, Type of Literal DateTime32 will be lost during parsing plan of CH as it will be convert to Int16.

(Fixes: #5910)

How was this patch tested?
This patch was tested manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors 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