Commit Graph

14 Commits

Author SHA1 Message Date
b4cd14d713 planner: use SEMI_JOIN_REWRITE hint to rewrite the semi join (#35325)
close pingcap/tidb#35323
2022-07-14 15:49:05 +08:00
e50b9430fc *: enable gci (#35823)
ref pingcap/tidb#35345
2022-07-04 14:53:02 +08:00
b4df7ca4dc test: make all the tests run in serial (#30692) 2021-12-14 18:06:36 +08:00
7746b6b70a test: fix incorrect regexp pattern during migrating test (#30080) 2021-12-02 05:51:53 +08:00
9a780a2138 parser: migrate test-infra to testify (#29087) 2021-10-27 19:28:49 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
f09db3e3ce [parser] feat: force_index hint (#1205) 2021-10-09 14:53:23 +08:00
ce43a3960b [parser] parser: introduce a new hint set_var (#1039)
* support hint SET_VAR

* add set_var test

* add test case

Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
ecb9e410a4 [parser] parser: support partition in table hint (#880) 2021-10-09 14:53:23 +08:00
3b3575a14e [parser] Change hint "enable_plan_cache(bool)" to "ignore_plan_cache()" (#785) 2021-10-09 14:53:23 +08:00
ea8d816ea7 [parser] rename sm_join to merge_join, letter case correction (#775)
Co-authored-by: kennytm <kennytm@gmail.com>
2021-10-09 14:53:23 +08:00
1471d3cc89 [parser] parser: add USE_CASCADES hint syntax (#769)
Signed-off-by: gauss <gauss1314@gmail.com>
2021-10-09 14:53:23 +08:00
cfc2e0273f [parser] refine table optimizer hint and make it more generic (#747)
* refine table optimizer hint and make it more generic

Signed-off-by: Lonng <heng@lonng.org>

* implement the restore

Signed-off-by: Lonng <heng@lonng.org>

* address comment

Signed-off-by: Lonng <heng@lonng.org>

* address comment

Signed-off-by: Lonng <heng@lonng.org>

* fix typo

Signed-off-by: Lonng <heng@lonng.org>
2021-10-09 14:53:23 +08:00
5cfb690491 [parser] Rewrite special comment parser (#711)
* lexer: added a function to scan version digits

* lexer: removed special comment scanner

Instead, simply strip off '/*!' and the pairing '*/'.

Temporarily disabled handling of /*+ ... */

* lexer: support collecting the entire /*+ ... */ as a single token

This new token has type `hintComment`. The actual hint will be parsed
lazily.

* lexer,yy_parser: move lastErrorAsWarn() from Parser into Scanner

* goyacc: do not allow conflict, support changing parser type name

change the "DO NOT EDIT" line to fit the Go standard

* parser,hintparser: created a new parser just for parsing optimizer hints

deleted all optimizer hint rules from parser.go

refactor the Makefile to support building both parsers (also deleted some
outdated fixup of *parser.go)

* lexer: fix comment parser

* codecov: don't wait for integration test before showing the coverage

* lexer: fix comment parsing again

* hintparser: TiDB still expects `HASH_JOIN(@qb1 foo@qb2)` to be valid :(

* parser,hintparser: provide the true line/column offset in the warnings

cache the hintparser in the main parser to avoid repeated allocation

* lexer: delete unused sqlOffsetInComment()
2021-10-09 14:53:23 +08:00