docs icon indicating copy to clipboard operation
docs copied to clipboard

*: add data type default values

Open hfxsd opened this issue 11 months ago • 6 comments

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • [x] master (the latest development version)
  • [x] v8.0 (TiDB 8.0 versions)
  • [ ] v7.6 (TiDB 7.6 versions)
  • [ ] v7.5 (TiDB 7.5 versions)
  • [ ] v7.4 (TiDB 7.4 versions)
  • [ ] v7.1 (TiDB 7.1 versions)
  • [ ] v6.5 (TiDB 6.5 versions)
  • [ ] v6.1 (TiDB 6.1 versions)
  • [ ] v5.4 (TiDB 5.4 versions)
  • [ ] v5.3 (TiDB 5.3 versions)
  • [ ] v5.2 (TiDB 5.2 versions)
  • [ ] v5.1 (TiDB 5.1 versions)
  • [ ] v5.0 (TiDB 5.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:https://github.com/pingcap/docs-cn/pull/16751
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • [ ] Delete files
  • [ ] Change aliases
  • [ ] Need modification after applied to another branch
  • [ ] Might cause conflicts after applied to another branch

hfxsd avatar Mar 06 '24 02:03 hfxsd

@Frank945946: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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/test-infra repository.

ti-chi-bot[bot] avatar Mar 06 '24 03:03 ti-chi-bot[bot]

Do we need to add anything related to https://github.com/pingcap/tidb/issues/49508 ?

And https://github.com/pingcap/tidb/issues/45506 seems to suggest that more functions might be supported.

dveeden avatar Mar 06 '24 08:03 dveeden

Looking at getFuncCallDefaultValue() it looks like these are supported:

  • CURRENT_TIMESTAMP(),
  • CURRENT_DATE()
  • NEXTVAL()
  • RAND()
  • UUID()
  • UUID_TO_BIN()
  • DATE_FORMAT()
  • REPLACE()
  • UPPER()
  • STR_TO_DATE()

Some of these (REPLACE(), UPPER(), ...) are only supported with specific arguments.

dveeden avatar Mar 06 '24 08:03 dveeden

[LGTM Timeline notifier]

Timeline:

  • 2024-03-06 03:28:32.926512161 +0000 UTC m=+224139.948758549: :ballot_box_with_check: agreed by tangenta.
  • 2024-03-06 09:39:09.552779814 +0000 UTC m=+246376.575026203: :ballot_box_with_check: agreed by zimulala.

ti-chi-bot[bot] avatar Mar 06 '24 09:03 ti-chi-bot[bot]

Looking at getFuncCallDefaultValue() it looks like these are supported:

  • CURRENT_TIMESTAMP(),
  • CURRENT_DATE()
  • NEXTVAL()
  • RAND()
  • UUID()
  • UUID_TO_BIN()
  • DATE_FORMAT()
  • REPLACE()
  • UPPER()
  • STR_TO_DATE()

Some of these (REPLACE(), UPPER(), ...) are only supported with specific arguments.

  • CURRENT_DATE and CURRENT_DATE already supported on line9. We can also add it if you want
  • REPLACE, UPPER, STR_TO_DATE supported as this PR, and the related issue: https://github.com/pingcap/tidb/issues/50936

zimulala avatar Mar 06 '24 09:03 zimulala

/approve

hfxsd avatar Mar 19 '24 02:03 hfxsd

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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[bot] avatar Mar 19 '24 02:03 ti-chi-bot[bot]