Skip to content

DeferredExpr is lost in constant folding #7914

@eurekaka

Description

@eurekaka

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

When reviewing #7808, I realized that we lost DeferredExpr of Constant when doing aggressive constant folding(introduced in #7696).

  1. What did you expect to see?

We should maintain this property of Constant.

  1. What did you see instead?

DeferredExpr is lost in constant folding.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                    |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.0-rc.3-44-g660191c
Git Commit Hash: 660191c5d7a28bea4a871e3e6d338cd9d0aef5a4
Git Branch: master
UTC Build Time: 2018-10-12 11:17:26
GoVersion: go version go1.11rc1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions