LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-378] Regular expressions in SIMILAR TO predicates potentially dont match SQL:2008 spec in a few cases. #430

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="sunil", created="Fri, 8 May 2009 01:46:18 -0500 (GMT-05:00)"] Certain meta characters dont parse well while adjecent to each other.


e.g.
VALUES('y' SIMILAR TO 'x_+y'); -- returns true
VALUES('y' SIMILAR TO 'x+y');
Error: java.util.regex.PatternSyntaxException: Dangling meta character '
' near index 2
x?_y
  ^ (state=,code=0)


Interestingly, VALUES('y' SIMILAR TO '(x+)*y') returns true.


This may very well be expected behavior. However, I verified on postgreSQL install, both patterns return illegal regex error. If farrago behavior is indeed SQL:2008 compliant, then we need to make sure there is elaborate section on regular expressions explaining these cases in farrago documents.

dynamobi-build commented 12 years ago

[author="sunil", created="Fri, 8 May 2009 01:48:54 -0500 (GMT-05:00)"] Looks like the component(Runtime) was not set for the issue. At the moment, dont know how to set the component after issue is created.

dynamobi-build commented 12 years ago

[author="sunil", created="Wed, 13 May 2009 16:08:49 -0500 (GMT-05:00)"] There are other cases where FennelCalc & Farrago JavaVM behave differently.


e.g.


VALUES('y' similar to 'x*+y')
VALUES('y' similar to 'x?+y')


both return 'true' with JavaVM. They throw exception with FennelVM. We need to make sure we have consistent behavior.

dynamobi-build commented 12 years ago

[author="sunil", created="Wed, 13 May 2009 16:26:00 -0500 (GMT-05:00)"] Java calc & Fennel calc also throw exceptions with different exception message strings. It would be nice if both calc components returned the same message for exception. I have a few negative tests in SqlOperatorTests.testSimilarToOperator() that fail due to different exception messages.