History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: FRG-378
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: John V. Sichi
Reporter: Sunil Mujumdar
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Farrago

Regular expressions in SIMILAR TO predicates potentially dont match SQL:2008 spec in a few cases.

Created: 08/May/09 01:46 AM   Updated: 13/May/09 04:26 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Farrago build on Ubuntu 64-bit.


 Description  « Hide
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.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Sunil Mujumdar - 08/May/09 01:48 AM
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.

Sunil Mujumdar - 13/May/09 04:08 PM
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.

Sunil Mujumdar - 13/May/09 04:26 PM
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.