scylladb / scylla-doc-issues

Repository for reporting issues about Scylla documentation (Deprecated)
2 stars 6 forks source link

Scylla CQL LIKE compared to Cassandra CQL LIKE #140

Closed PeterCorless closed 3 years ago

PeterCorless commented 4 years ago

Update the path to the relevant Doc page: https://docs.scylladb.com/getting-started/dml/#like-operator

Problem

Scylla's CQL LIKE operator is implemented in significantly different ways than the Cassandra 3.4+ CQL LIKE operator, which relies on SASI.

Suggest a fix

Our documentation should note this difference, which will confuse Cassandra users, and poses a marked way we are NOT a "drop-in replacement" for Cassandra. The docs should simply note the difference for users; no need to get into the reasons we implemented this differently. (I'll try to get work on a separate blog which can go into more details as to why we implemented the feature in this way.)

tzach commented 4 years ago

@dekimir can you please help by providing the difference between Cassandra and Scylla LIKE in 1-2 paragraphs

dekimir commented 4 years ago

Please see https://github.com/scylladb/scylla/issues/4477#issuecomment-525358891

stale[bot] commented 4 years ago

Thanks for reporting. This issue has been automatically marked as stale because it had no activity for the last few months, and will be closed if no further action taken. If the issue is valid, please add a comment to keep it alive!

lauranovich commented 4 years ago

@dekimir is this what you had in mind?

Differences between Cassandra and Scylla LIKE:

In Cassandra, you must create a SASI index to use LIKE. Scylla supports LIKE as a regular filter. Consequently, Scylla LIKE will often be less performant than Cassandra LIKE. Scylla treats underscore (_) as a wildcard; Cassandra doesn't. Scylla treats percent (%) as a wildcard anywhere in the pattern; Cassandra only at the beginning/end. Scylla interprets backslash () as an escape character; Cassandra doesn't. Cassandra allows case-insensitive LIKE; Scylla doesn't yet (but see #4911). Scylla allows empty LIKE pattern; Cassandra doesn't. anything else?

dekimir commented 4 years ago

anything else?

Not at this time.

avikivity commented 4 years ago

s/often/for some workloads/. In some cases filtering is faster.