Files
tidb/parser/ast
kennytm 5fe457fc98 [parser] ast,parser: added several expression types to represent keyword arguments (#142)
* ast,parser: added several expression types to represent keyword arguments

Added TimeUnitExpr to represent time and timestamp units like SECOND in
DATE_ADD(time, INTERVAL x SECOND).

Added GetFormatSelectorExpr to represent the selectors like DATETIME in
GET_FORMAT(DATETIME, locale).

Added TrimDirectionExpr to represent the direction like BOTH in
TRIM(BOTH 'x' FROM 'xyz').

Changed FrameBound's Unit to use TimeUnitType directly.

Previously these were all converted into a string or integer ValueExpr,
which made Restore() implementation very ugly.

* ast: change type of PartitionMethod.Unit from ValueExpr to TimeUnitType
2021-10-09 14:53:23 +08:00
..