Skip to content

The result of comparison function on date value should return DATE type #46475

@pcqz

Description

@pcqz

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

bash$ mysql --column-type-info

mysql> select coalesce(current_date(),null) from dual;

2. What did you expect to see? (Required)

Field   1:  `coalesce(current_date(),null)`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       DATE
...

3. What did you see instead (Required)

Field   1:  `coalesce(current_date(),null)`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       DATETIME
...

4. What is your TiDB version? (Required)

v6.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-5.3This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.component/expressionfound/gsfound by gsreport/customerCustomers have encountered this bug.severity/majorsig/executionSIG executiontype/bugThe issue is confirmed as a bug.type/compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions