-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
Description
Problem
When using filter, if the column specified has special character in them then the validation regex does not pass it as of now. We need to fix the regex, such that special named columns can also be parsed.
olake/types/stream_configured.go
Lines 92 to 95 in 2b4a2de
// TODO: handle special characters in column name in filter | |
// example: a>b, a>=b, a<b, a<=b, a!=b, a=b, a="b", a=\"b\" and c>d, a="b" or c>d | |
var FilterRegex = regexp.MustCompile(`^(\w+)\s*(>=|<=|!=|>|<|=)\s*(\"[^\"]*\"|\d*\.?\d+|\w+)\s*(?:(and|or)\s*(\w+)\s*(>=|<=|!=|>|<|=)\s*(\"[^\"]*\"|\d*\.?\d+|\w+))?\s*$`) | |
matches := FilterRegex.FindStringSubmatch(filter) |