Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: Allow parentheses around column default literal values in CREATE TABLE #59023

Merged

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Jan 17, 2025

What problem does this PR solve?

Issue Number: close #58947

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Allow parentheses around column default literal value in CREATE TABLE, like MySQL does.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/invalid-title size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 17, 2025
Copy link

tiprow bot commented Jan 17, 2025

Hi @mjonss. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mjonss mjonss changed the title Allow parentheses around column default literal values in CREATE TABLE parser: Allow parentheses around column default literal values in CREATE TABLE Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5707%. Comparing base (d31be66) to head (67af835).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59023        +/-   ##
================================================
+ Coverage   73.1516%   73.5707%   +0.4190%     
================================================
  Files          1706       1706                
  Lines        471411     471659       +248     
================================================
+ Hits         344845     347003      +2158     
+ Misses       105390     103483      -1907     
+ Partials      21176      21173         -3     
Flag Coverage Δ
integration 42.9072% <ø> (?)
unit 72.3351% <ø> (-0.0263%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 47.2264% <ø> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mjonss mjonss requested a review from Copilot January 17, 2025 14:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • pkg/parser/parser.y: Language not supported
  • tests/integrationtest/r/ddl/column.result: Language not supported
  • tests/integrationtest/t/ddl/column.test: Language not supported

@mjonss mjonss requested a review from dveeden January 17, 2025 14:03
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 17, 2025
Copy link
Contributor

@dveeden dveeden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works for integer literals, not for JSON literals. But that can be added later.

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 17, 2025
Copy link

ti-chi-bot bot commented Jan 17, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-17 14:39:54.089493546 +0000 UTC m=+302265.544539695: ☑️ agreed by CbcWestwolf.
  • 2025-01-17 15:01:09.017972556 +0000 UTC m=+303540.473018704: ☑️ agreed by dveeden.

Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also include a document PR.

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Mar 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, CbcWestwolf, dveeden, yudongusa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Mar 14, 2025
@bb7133
Copy link
Member

bb7133 commented Mar 14, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit 3ccc5aa into pingcap:master Mar 14, 2025
24 checks passed
@mjonss mjonss deleted the allow-default-literal-parentheses-58947 branch March 31, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make DEFAULT (...) supports literals for better compatibility
5 participants