*: add as of clause for SET and SELECT#1206
Conversation
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
|
Some details need to discuss pingcap/tidb#22765 (comment) |
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
kennytm
left a comment
There was a problem hiding this comment.
is it possible to use a TSO as the input to the AS OF clause?
select * from a as of timestamp 424430616285806594;
-- or?
select * from a as of tso 424430616285806594;Signed-off-by: nolouch <nolouch@gmail.com>
|
@kennytm Our TSO has some logic bits, not really Unix timestamp. if really have a scene TSO as input we can add it in the future. |
|
/lgtm
I'd like to note that |
|
If want tso as input, may we also support it in |
|
/lgtm |
| } | ||
| case *ast.FuncCallExpr: | ||
| node.FnName.O = strings.ToLower(node.FnName.O) | ||
| node.SetOriginTextPosition(0) |
There was a problem hiding this comment.
It's cleans the some text in the node, then we can use reflect.DeepEquals to compare two statements in :
Lines 388 to 391 in f416dc9
* *: add as of clause Signed-off-by: nolouch <nolouch@gmail.com> * resolve shift-reduce conflict * *: fix and try to add test Signed-off-by: nolouch <nolouch@gmail.com> * *: add timestamp Signed-off-by: nolouch <nolouch@gmail.com> * make as of to token Signed-off-by: nolouch <nolouch@gmail.com> * address comments Signed-off-by: nolouch <nolouch@gmail.com> * add test Signed-off-by: nolouch <nolouch@gmail.com> * make of as Reserved(from mysql 8.0) Signed-off-by: nolouch <nolouch@gmail.com> * add set test case Signed-off-by: nolouch <nolouch@gmail.com> * address comment Signed-off-by: nolouch <nolouch@gmail.com> Co-authored-by: tangenta <tangenta@126.com>
Signed-off-by: nolouch nolouch@gmail.com
What problem does this PR solve?
Ref pingcap/tidb#22765 (comment)
What is changed and how it works?
Check List
Tests