argasi / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Add string comparison STARTSWITH and ENDSWITH #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I know I can do this with regular expressions, but like CONTAINS, it is sooo 
much easier to write

  WHERE path STARTSWITH '/some/url'

Seems like it would be a piece of cake to provide this. May not be traditional 
SQL, but sure would be convenient!

Original issue reported on code.google.com by jcoll...@vendasta.com on 20 Sep 2013 at 8:11

GoogleCodeExporter commented 9 years ago
A slightly more standard construct is LIKE, which uses % as a wildcard:

  WHERE path LIKE '/some/url%'

BigQuery doesn't support this construct right now, but it should be pretty easy 
to add. Thanks for the suggestion!

Original comment by jcon...@google.com on 20 Sep 2013 at 8:18

GoogleCodeExporter commented 9 years ago
Yup, LIKE would be great too - it just felt a bit too close to the regexp for 
me to request it. I'm fine with LIKE

Original comment by jcoll...@vendasta.com on 20 Sep 2013 at 8:43

GoogleCodeExporter commented 9 years ago
Excellent. We just missed the next release cycle, so LIKE should be available 
in the following release (about 1.5 weeks from now). Thanks again for the 
suggestion!

Original comment by jcon...@google.com on 20 Sep 2013 at 10:24