sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

fix: LIKE expression with invalid string literals returns a parse error instead of panicking

Open Cali0707 opened this issue 9 months ago • 5 comments

Fixes #931

When visiting the nodes of the AST while parsing the LIKE expression, it looks like we assumed that we would have a valid string literal. However, it is possible that there is no valid string literal, in which case we have to handle that and return an error rather than continuing to parse (and subsequently panicking)

Cali0707 avatar May 01 '24 14:05 Cali0707

cc @duglin @pierDipi @lionelvillard

Cali0707 avatar May 01 '24 14:05 Cali0707

Aside from my minor question, LGTM

duglin avatar May 03 '24 14:05 duglin

cc @embano1

Cali0707 avatar May 14 '24 16:05 Cali0707

do we have a testcase for this?

duglin avatar May 14 '24 23:05 duglin

do we have a testcase for this?

@duglin yes, the new tck test in this PR runs and passes with this change, but prior to the change it would panic

Cali0707 avatar May 15 '24 14:05 Cali0707

@duglin for final approval/merge

lionelvillard avatar Jun 11 '24 22:06 lionelvillard

LGTM - it needed a rebase so kicked that off...

duglin avatar Jun 12 '24 16:06 duglin

merging...

duglin avatar Jun 12 '24 17:06 duglin