> space text,
> > x double,
> > y double,
> > item text,
> > m1,
> > m2,
> > m3,
> > primary key ((space), x, y, m1, m2, m3, m4, m5)
> > );
> >
> > A query of select * where space = '1,1' and x <1 and x >0.5 and y< 0.2
> and y&g
> item text,
> m1,
> m2,
> m3,
> primary key ((space), x, y, m1, m2, m3, m4, m5)
> );
>
> A query of select * where space = '1,1' and x <1 and x >0.5 and y< 0.2 and
> y>0.1; should yield all x and y pairs and their distinct metadata. Or
> something like th
here x and
y are > 0 and <= 1. You would then have a table like:
CREATE TABLE geospatial (
space text,
x double,
y double,
item text,
m1,
m2,
m3,
primary key ((space), x, y, m1, m2, m3, m4, m5)
);
A query of select * where space = '1,1' and x <1 and x >0.5 and y< 0.2 and
y>0.1;
Hi Lydia,
Yes. This will define the *x*, *y* columns as the components of the
partition key. Note that by doing this both *x* and *y* values will be
required to at a minimum to perform a valid query.
Alternatively, the *x* and *y* values could be combined in into a single
text field as Jon has
ated way.
>>
>> My aim is to store x- and y-coordinates, accompanied by some columns with
>> meta information (m1, ... ,m5). There will be around 100,000,000 rows
>> overall. Some rows might have the same (x,y) pairs but always distinct meta
>> information.
>
n how to
>> tackle a table creation / indexing in a sophisticated way.
>>
>> My aim is to store x- and y-coordinates, accompanied by some columns with
>> meta information (m1, ... ,m5). There will be around 100,000,000 rows
>> overall. Some rows might have the same (x,y) pair
always distinct meta
> information.
>
> In the end I want to do a rather simple range query in the form of e.g. (0 >=
> x <= 1) AND (0 >= y <= 1).
>
> What would be the best choice of variables to set as primary key, partition
> key. Or should I use a index? And if s
. Some
rows might have the same (x,y) pairs but always distinct meta information.
In the end I want to do a rather simple range query in the form of e.g. (0 >= x
<= 1) AND (0 >= y <= 1).
What would be the best choice of variables to set as primary key, partition
key. Or should I
a table like this:
PRIMARY KEY ((userid),deviceid)
And I query
SELECT * FROM devices where userid= ? and deviceid = ?
Will cassandra read the entire partition for the userid? So if I lots of
tombstones for userid, will they get scanned?
I guess this depends on how the bloomfilter
Consulting
http://www.thelastpickle.com
2017-04-21 10:44 GMT+02:00 Oskar Kjellin <oskar.kjel...@gmail.com>:
> If I have a table like this:
>
> PRIMARY KEY ((userid),deviceid)
>
> And I query
> SELECT * FROM devices where userid= ? and deviceid = ?
>
> Will cassa
If I have a table like this:
PRIMARY KEY ((userid),deviceid)
And I query
SELECT * FROM devices where userid= ? and deviceid = ?
Will cassandra read the entire partition for the userid? So if I lots of
tombstones for userid, will they get scanned?
I guess this depends on how the bloomfilter
Hi Jon,
Thanks for your guidance.
In above mentioned table i can have different scale depending on Report.
One report may have 1 rows.
Second report may have half million rows.
Third report may have 1 million rows.
Fourth report may have 10 million rows.
As this is timeseries data that was
How much data do you plan to store in each table?
I’ll be honest, this doesn’t sound like a Cassandra use case at first glance.
1 table per report x 1000 is going to be a bad time. Odds are with different
queries, you’ll need multiple views, so lets call that a handful of tables per
report.
Looking for cassandra expert's recommendation on above usecase, please
reply.
On Mon, Apr 17, 2017 at 7:37 PM, Naresh Yadav wrote:
> Hi all,
>
> This is my existing table configured on apache-cassandra-3.0.9:
>
> CREATE TABLE report_id1 (
>mc_id text,
>tag_id text,
Hi all,
This is my existing table configured on apache-cassandra-3.0.9:
CREATE TABLE report_id1 (
mc_id text,
tag_id text,
e_date timestamp.
value text
PRIMARY KEY ((mc_id, tag_id), e_date)
}
I create table dynamically for each report from application. Need to
support upto 1000
es <k...@instaclustr.com>
>> wrote:
>>
>>> As secondary indexes are stored individually on each node what you're
>>> suggesting sounds exactly like a consistency issue. the fact that you read
>>> 0 cells on one query implies the node that got the query
; As secondary indexes are stored individually on each node what you're
>> suggesting sounds exactly like a consistency issue. the fact that you read
>> 0 cells on one query implies the node that got the query did not have any
>> data for the row. The reason you would sometimes
issues may be.
On Mon, Mar 20, 2017 at 2:42 PM, kurt greaves <k...@instaclustr.com> wrote:
> As secondary indexes are stored individually on each node what you're
> suggesting sounds exactly like a consistency issue. the fact that you read
> 0 cells on one query implies the node tha
As secondary indexes are stored individually on each node what you're
suggesting sounds exactly like a consistency issue. the fact that you read
0 cells on one query implies the node that got the query did not have any
data for the row. The reason you would sometimes see different behaviours
> with the same parameters tomorrow, they're likely to work correctly.
>
> Only thing I've been able to glean from tracing execution is that the
> queries that work follow "Executing read..." with "Executing single
> partition query on t1" and so forth, whereas the quer
urther confounding the issue is that if my testers run these same queries
with the same parameters tomorrow, they're likely to work correctly.
Only thing I've been able to glean from tracing execution is that the
queries that work follow "Executing read..." with "Executing single
partition qu
On Wed, Feb 22, 2017 at 8:42 AM, 안정아 <jungah@samsung.com> wrote:
> Hi, all
>
>
>
> I'm trying to implement a typical CAS operation with LWT query(conditional
> update).
>
> But I'm having trouble keeping integrity of the result when
> WriteTimeoutExcept
Hi, all
I'm trying to implement a typical CAS operation with LWT query(conditional update).
But I'm having trouble keeping integrity of the result when WriteTimeoutException occurs.
according to http://www.datastax.com/dev/blog/cassandra-error-handling-done-right
"If the paxos
t;k...@peernova.com> wrote:
> is there a query to find out the largest partition in a table? Does the
> query below give me the largest partition?
>
> select max(mean_partition_size) from size_estimates ;
>
> Thanks,
> Kant
>
is there a query to find out the largest partition in a table? Does the
query below give me the largest partition?
select max(mean_partition_size) from size_estimates ;
Thanks,
Kant
[mailto:sumit.anve...@gmail.com]
Sent: Wednesday, December 21, 2016 3:47 PM
To: user@cassandra.apache.org
Subject: Re: Query on Cassandra clusters
Thank you Alain for the detailed explanation.
To answer you question on Java version, JVM settings and Memory usage. We are
using using 1.8.0_45
om>
> Sent: Friday, December 30, 2016 5:53 AM
> To: user@cassandra.apache.org
> Subject: Re: Query
>
> You should start with understanding your needs. Once you understand your need
> you can pick the software that fits your need. Staring with a software stack
> is backwar
studies, too, with their enterprise version of
Cassandra:
http://www.datastax.com/resources/casestudies
Sean Durity
From: Sikander Rafiq [mailto:hafiz_ra...@hotmail.com]
Sent: Friday, December 30, 2016 8:00 AM
To: user@cassandra.apache.org
Subject: Re: Query
Thanks for your comments/suggestions
2016 5:53 AM
To: user@cassandra.apache.org
Subject: Re: Query
You should start with understanding your needs. Once you understand your need
you can pick the software that fits your need. Staring with a software stack is
backwards.
On Thu, Dec 29, 2016 at 11:34 PM, Ben Slater
<ben.sla...@
You should start with understanding your needs. Once you understand your
need you can pick the software that fits your need. Staring with a software
stack is backwards.
On Thu, Dec 29, 2016 at 11:34 PM, Ben Slater
wrote:
> I wasn’t familiar with Gizzard either so I
I wasn’t familiar with Gizzard either so I thought I’d take a look. The
first things on their github readme is:
*NB: This project is currently not recommended as a base for new consumers.*
(And no commits since 2013)
So, Cassandra definitely looks like a better choice as your datastore for a
new
I am not that familiar with gizzard but with gizzard + mysql , you have
multiple moving parts in the system that need to managed separately. You'll
need the mysql expert for mysql and the gizzard expert to manage the
distributed part. It can be argued that long term this will have higher
Hi,
I'm exploring Cassandra for handling large data sets for mobile app, but i'm
not clear where it stands.
If we use MySQL as underlying database and Gizzard for building custom
distributed databases (with arbitrary storage technology) and Memcached for
highly queried data, then where lies
t;
>>> On Thu, Dec 29, 2016 at 10:00 AM, Ashutosh Dhundhara <
>>> ashutoshdhundh...@yahoo.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have a table like this:
>>>>
>>>> CREATE TABLE IF NOT EXISTS Posts (
>>&
is:
>>>
>>> CREATE TABLE IF NOT EXISTS Posts (
>>> idObject int,
>>> objectType text,
>>> idParent int,
>>> id int,
>>> idResolution int,
>>> PRIMARY KEY ((idObject, objectType, idParent), id)
>>> )
t; I have a table like this:
>>
>> CREATE TABLE IF NOT EXISTS Posts (
>> idObject int,
>> objectType text,
>> idParent int,
>> id int,
>> idResolution int,
>> PRIMARY KEY ((idObject, objectType, idParent), id)
>&g
t), id)
> );
>
> Now have a look at the following query:
>
> SELECT * FROM POSTS WHERE idobject = 1 AND objectType = 'COURSE' AND idParent
> = 0 AND idResolution = 1 ALLOW FILTERING
>
> Now the Partition Key is completely known, so if I use ALLOW FILTERING is
> there g
Hi All,
I have a table like this:
CREATE TABLE IF NOT EXISTS Posts (
idObject int,
objectType text,
idParent int,
id int,
idResolution int,
PRIMARY KEY ((idObject, objectType, idParent), id)
);
Now have a look at the following query:
SELECT * FROM POSTS WHERE idobject
Thank you Alain for the detailed explanation.
To answer you question on Java version, JVM settings and Memory usage. We
are using using 1.8.0_45. precisely
>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build
Hi Sumit,
1. I have a Cassandra cluster with 11 nodes, 5 of which have Cassandra
> version 3.0.3 and then newer 5 nodes have 3.6.0 version.
I strongly recommend to:
- Stick with one version of Apache Cassandra per cluster.
- Always be as close as possible from the last minor release of
I have a couple questions.
1. I have a Cassandra cluster with 11 nodes, 5 of which have Cassandra
version 3.0.3 and then newer 5 nodes have 3.6.0 version. I has been running
fine until recently I am seeing higher amount of data residing in newer
boxes. The configuration file (YAML file) is
On 2016-12-03 08:44 (-0800), Edward Capriolo wrote:
> On Sat, Dec 3, 2016 at 11:01 AM, Edward Capriolo
> wrote:
>
> >
> >
> > A new unique timeuuid (at the time where the statement using it is
> > executed).
> >
> > Indicates that each statement
g I guess, and we can switch to
>>>>>>> discussing that, but it's a different problem really and I'm not a fond
>>>>>>> of
>>>>>>> derailing threads. I will just note though that if we're not talking
>>>>>>>
not talking about a
>>>>>> confusion issue but rather how to get a timeuuid to be fixed within a
>>>>>> statement, then there is much much more trivial solution: generate it
>>>>>> client side. The `now()` function is a small convenience but ther
n: generate it
>>>>> client side. The `now()` function is a small convenience but there is
>>>>> nothing you cannot do without it client side, and that actually basically
>>>>> stands for almost any use of (non aggregate) function in Cassandra
>>>>&g
is
> nothing you cannot do without it client side, and that actually basically
> stands for almost any use of (non aggregate) function in Cassandra
> currently.
>
>
>
>
> "Food for thought: Hive's UDFs introduced an annotation
> @UDFType(deterministic
> = false)
>
&g
small convenience but there is
>>> nothing you cannot do without it client side, and that actually basically
>>> stands for almost any use of (non aggregate) function in Cassandra
>>> currently.
>>>
>>>
>>>>
>>>>
>>
a
> currently.
>
>
>
>
> "Food for thought: Hive's UDFs introduced an annotation
> @UDFType(deterministic
> = false)
>
>
> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map-and-reduce-side-in-hive/
>
> The effect is the query planner can see when su
urrently.
>
>
>>
>>
>> "Food for thought: Hive's UDFs introduced an annotation
>> @UDFType(deterministic = false)
>>
>> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map
>> -and-reduce-side-in-hive/
>>
>> The effect is t
behaviour.
And how is
>that actually useful: you're having different result anyway and you're
>letting the server pick the timestamp in the first place, so you're
> probably
>not caring about milliseconds precision of that timestamp in the first
> place.
>
If you want con
One millisecond is not an issue in most of Internet of Things projects out
there. There are lots of connection related things that add far more
latency to the requests than that. Especially if you take into account the
time it takes for the data to actually come to a cassandra node in the
On Thu, Dec 1, 2016 at 11:09 AM Sylvain Lebresne
wrote:
> there is much much more trivial solution: generate it client side. The
> `now()` function is a small convenience but there is nothing you cannot do
> without it client side
>
Please see my post above as to why this
urrently.
>
>
>>
>>
>> "Food for thought: Hive's UDFs introduced an annotation
>> @UDFType(deterministic = false)
>>
>> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map
>> -and-reduce-side-in-hive/
>>
>> The effect is t
Cassandra
> currently.
>
>
>
>
> "Food for thought: Hive's UDFs introduced an annotation
> @UDFType(deterministic
> = false)
>
>
> http://dmtolpeko.com/2014/10/15/invoking-stateful-udf-at-map-and-reduce-side-in-hive/
>
> The effect is the query planner ca
ful-udf-at-map
> -and-reduce-side-in-hive/
>
> The effect is the query planner can see when such a UDF is in use and
> determine the value once at the start of a very long query."
>
> Essentially hive had a similar if not identical problem, during a long
> running distributed proces
Get Outlook for Android<https://aka.ms/ghei36>
From: Edward Capriolo <edlinuxg...@gmail.com>
Sent: Thursday, December 1, 2016 10:44:10 AM
To: user@cassandra.apache.org
Subject: Re: Why does `now()` produce different times within the same query?
O
rote:
>>>>
>>>> Getting the same TimeUUID values might be a major problem. Getting two
>>>> different TimeUUIDs that at least have time component would not be a major
>>>> problem as this is the main case today. Getting different time components
&g
and it is a corner case that breaks
>>> Internet-of-Things applications. We can tightly control clock skew in our
>>> cluster. We most definitely CANNOT control clock skew on the thousands of
>>> sensors that write to our cluster.
>>>
>>> Thanks,
>
t;> inserts the value returned by now(). Getting the same UUID for each insert
>> would be a major problem.
>>
>> Cheers
>>
>> Robert
>>
>>
>> On Nov 30, 2016, at 4:46 PM, Todd Fast <t...@digitalexistence.com> wrote:
>>
>> FWIW I'd suggest o
te
> unexpected and more than just a documentation issue. In general I can't
> imagine any desirable properties of the current implementation, and there
> are likely a bunch of latent bugs sitting out there, so it should be fixed.
>
> Todd
>
> On Wed, Nov 30, 2016 at 12:37 PM Terry
gt;> Cheers
>>>>
>>>> Robert
>>>>
>>>>
>>>> On Nov 30, 2016, at 4:46 PM, Todd Fast <t...@digitalexistence.com>
>>>> wrote:
>>>>
>>>> FWIW I'd suggest opening a bug--this behavior is certainly q
italexistence.com>
>>> wrote:
>>>
>>> FWIW I'd suggest opening a bug--this behavior is certainly quite
>>> unexpected and more than just a documentation issue. In general I can't
>>> imagine any desirable properties of the current implementation, an
bugs sitting out there, so it should be fixed.
>>
>> Todd
>>
>> On Wed, Nov 30, 2016 at 12:37 PM Terry Liu <t...@turnitin.com> wrote:
>>
>>> Sorry for my typo. Obviously, I meant:
>>> "It appears that a single query that calls Cassandra's`
ikely a bunch of latent bugs sitting out there, so it should be fixed.
>
> Todd
>
> On Wed, Nov 30, 2016 at 12:37 PM Terry Liu <t...@turnitin.com> wrote:
>
>> Sorry for my typo. Obviously, I meant:
>> "It appears that a single query that calls Cassandra's`now()`
e are likely a bunch of
latent bugs sitting out there, so it should be fixed.
Todd
On Wed, Nov 30, 2016 at 12:37 PM Terry Liu
<t...@turnitin.com<mailto:t...@turnitin.com>> wrote:
Sorry for my typo. Obviously, I meant:
"It appears that a single query that calls Cassandra's`now()`
On Wed, Nov 30, 2016 at 12:37 PM Terry Liu <t...@turnitin.com> wrote:
> Sorry for my typo. Obviously, I meant:
> "It appears that a single query that calls Cassandra's`now()` time
> function *multiple times *may actually cause a query to write or return
> different times."
Sorry for my typo. Obviously, I meant:
"It appears that a single query that calls Cassandra's`now()` time
function *multiple
times *may actually cause a query to write or return different times."
Less of a surprise now that I realize more about the implementation, but I
agree that mor
-11-29 22:49 GMT+01:00 Terry Liu <t...@turnitin.com>:
> It appears that a single query that calls Cassandra's `now()` time
> function may actually cause a query to write or return different times.
>
> Is this the expected or defined behavior, and if so, why does it behave
>
ax.com/en/cql/3.3/cql/cql_using/useWritetime.html for
each column. Writetime didn't seem have hits in the Apache docs so I
linked to the Datastax docs. I'll see about getting them updated.
Regards,
Ariel
On Tue, Nov 29, 2016, at 04:49 PM, Terry Liu wrote:
> It appears that a single query that calls Cassa
It appears that a single query that calls Cassandra's `now()` time function
may actually cause a query to write or return different times.
Is this the expected or defined behavior, and if so, why does it behave
like this rather than evaluating `now()` once across an entire statement?
This really
and 'tblA' using cql, it throw the
follwing exception.
query from viewA:
"ServerError: "
and query from tblA:
"ServerError: "
My system version is :
Cassandra 3.7 + spark1.6.2 + Spark Cassandra Connector 1.6
If anyone know ab
ylov <notxc...@gmail.com> wrote:
> Hi!
>
> We’re running Cassandra 3.9
>
> On the application side I see failed reads with this exception
> com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure
> during read query at consistency QUORUM (2 respons
s with this exception
> com.datastax.driver.core.exceptions.ReadFailureException: Cassandra
> failure during read query at consistency QUORUM (2 responses were required
> but only 0 replica responded, 2 failed)
>
> On the server side we see:
>
> WARN [SharedPool-Worker-3] 2016-10-28 13:28:22,965
&g
Hi!
We’re running Cassandra 3.9
On the application side I see failed reads with this exception
com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure
during read query at consistency QUORUM (2 responses were required but only 0
replica responded, 2 failed)
On the server
oup of member ids.
>
> I think it would be more efficient to do this as an IN query of the type:
> *project_id
> = x AND member_id IN (...)*, instead of doing multiple queries of: *project_id
> = x AND member_id = y*
>
> I tried to setup an accessor for this, as the following:
*);*
I have a scenario where I need to show all tickets for a particular
project, by a group of member ids.
I think it would be more efficient to do this as an IN query of the
type: *project_id
= x AND member_id IN (...)*, instead of doing multiple queries of: *project_id
= x AND member_id =
enter <
> jeff.carpen...@choicehotels.com> wrote:
>
>> Hello
>>
>> Consider the following schema:
>>
>> CREATE TABLE rates_by_code (
>> hotel_id text,
>> rate_code text,
>> rates set,
>> description text,
>> PRIM
E TABLE rates_by_code (
> hotel_id text,
> rate_code text,
> rates set,
> description text,
> PRIMARY KEY ((hotel_id), rate_code)
> );
>
> When executing the query:
>
> select rates from rates_by_code where hotel_id='AZ123' and rate_code IN
> ('ABC', 'DEF', 'GHI');
&
Hello
Consider the following schema:
CREATE TABLE rates_by_code (
hotel_id text,
rate_code text,
rates set,
description text,
PRIMARY KEY ((hotel_id), rate_code)
);
When executing the query:
select rates from rates_by_code where hotel_id='AZ123' and rate_code IN ('ABC',
'DEF', 'GHI
tion key and/or the last column in the
full primary key.
Example:
'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)'
On Tue, 11 Oct 2016 at 06:15 Ali Akhtar <ali.rac...@gmail.com> wrote:
If I wanted to create an accessor, and have a method which does a query
like this:
'S
last column in the partition key and/or the last column in the
full primary key.
Example:
'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)'
On Tue, 11 Oct 2016 at 06:15 Ali Akhtar <ali.rac...@gmail.com> wrote:
If I wanted to create an accessor, and have a method which
artition key and/or the last column in the
> full primary key.
>
> Example:
>
> 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)'
>
>
> On Tue, 11 Oct 2016 at 06:15 Ali Akhtar <ali.rac...@gmail.com> wrote:
>
> If I wanted to create an accessor, and have a
?
> (Without the brackets around the question mark)
>
> regards,
> Ch
>
> On Tue, Oct 11, 2016 at 3:14 PM, Ali Akhtar <ali.rac...@gmail.com> wrote:
>
>> If I wanted to create an accessor, and have a method which does a query
>> like this:
>>
>> 'Sele
artition key and/or the last column in the
> full primary key.
>
> Example:
>
> 'Select * from my_table WHERE pk = 'test' And ck IN (1, 2)'
>
>
> On Tue, 11 Oct 2016 at 06:15 Ali Akhtar <ali.rac...@gmail.com> wrote:
>
>> If I wanted to create an acc
Hi Ali,
do you perhaps want "'Select * from my_table WHERE pk = ? And ck IN ?'" ?
(Without the brackets around the question mark)
regards,
Ch
On Tue, Oct 11, 2016 at 3:14 PM, Ali Akhtar <ali.rac...@gmail.com> wrote:
> If I wanted to create an accessor, and have a method
rac...@gmail.com> wrote:
> If I wanted to create an accessor, and have a method which does a query
> like this:
>
> 'Select * from my_table WHERE pk = ? And ck IN (?)'
>
> And there were multiple options that could go inside the IN() query, how
> can I specify that? Will it e.g, let me
If I wanted to create an accessor, and have a method which does a query
like this:
'Select * from my_table WHERE pk = ? And ck IN (?)'
And there were multiple options that could go inside the IN() query, how
can I specify that? Will it e.g, let me pass in an array as the 2nd
variable?
gt;
> If order made on Jan 1, but not yet shipped, and today is Jan 10th, then
> shipment_delay = 10 days.
>
> I then need to sort the orders in the order of 'shipment_delay desc', i.e
> show the orders which took the longest, at the top.
>
> Is it possible to define 'shipment
of 'shipment_delay desc', i.e
show the orders which took the longest, at the top.
Is it possible to define 'shipment_delay' at the table or query level, so
it can be used in the 'order by' clause, or if this ordering will have to
be done myself after the data is received?
Thanks.
Please see my comments inline.
Thanks,
Mikhail
> On 26 Sep 2016, at 17:07, DuyHai Doan wrote:
>
> "In the current implementation (‘%’ could be a wildcard only at the start/end
> of a term) I guess it should be ’ENDS with ‘%escape’ ‘."
>
> --> Yes in the current impl, it
;
CREATE TABLE mykeyspace.mytable (partitionkey text, mylist list, PRIMARY
KEY (partitionkey));
If I add the value
INSERT INTO mykeyspace.mytable(partitionkey,mylist) VALUES('A',['1']);
and query
select * from mykeyspace.mytable;
I get
partitionkey | mylist
"In the current implementation (‘%’ could be a wildcard only at the
start/end of a term) I guess it should be ’ENDS with ‘%escape’ ‘."
--> Yes in the current impl, it means ENDS WITH '%escape' but we want SASI
to understand the %% as an escape for % so the goal is that SASI
understands LIKE
> LIKE '%%%escape' --> EQUALS TO '%%escape' ???
In the current implementation (‘%’ could be a wildcard only at the start/end of
a term) I guess it should be ’ENDS with ‘%escape’ ‘.
Moreover all terms that contains single ‘%’ somewhere in the middle should
cause an exception.
BUT may be it’s
Reminder, right now, the % character is only interpreted as wildcard IF AND
ONLY IF it is the first/last character of the searched term
LIKE '%escape' --> ENDS WITH 'escape'
If we use % to escape %,
LIKE '%%escape' --> EQUALS TO '%escape'
LIKE '%%%escape' --> EQUALS TO '%%escape' ???
On
Hi, Jim,
What pattern should be used to search “ends with ‘%escape’ “ with your
conception?
Thanks,
Mikhail
> On 22 Sep 2016, at 18:51, Jim Ancona wrote:
>
> To answer DuyHai's question without introducing new syntax, I'd suggest:
>> LIKE '%%%escape' means STARTS WITH
To answer DuyHai's question without introducing new syntax, I'd suggest:
LIKE '%%%escape' means STARTS WITH '%' AND ENDS WITH 'escape'
So the first two %'s are translated to a literal, non-wildcard % and the
third % is a wildcard because it's not doubled.
Jim
On Thu, Sep 22, 2016 at 11:40 AM,
I guess that it should be similar to how it is done in SQL for LIKE patterns.
You can introduce an escape character, e.g. ‘\’.
Examples:
‘%’ - any string
‘\%’ - equal to ‘%’ character
‘\%foo%’ - starts from ‘%foo’
‘%%%escape’ - ends with ’escape’
‘\%%’ - starts from ‘%’
‘\\\%%’ - starts from ‘\%’
Hello Mikhail
It's more complicated that it seems
LIKE '%%escape' means EQUAL TO '%escape'
LIKE '%escape' means ENDS WITH 'escape'
What's about LIKE '%%%escape'
How should we treat this case ? Replace %% by % at the beginning of the
searched term ??
On Thu, Sep 22, 2016 at 3:31 PM,
Hi!
We’ve talked about two items:
1) ‘%’ as a wildcard in the middle of LIKE pattern.
2) How to escape ‘%’ to be able to find strings with the ‘%’ char with help of
LIKE.
Item #1was resolved as CASSANDRA-12573.
Regarding to item #2: you said the following:
> A possible fix would be:
>
> 1)
Hi!
Have you had a chance to try your patch or solve the issue in an other way?
Thanks,
Mikhail
> On 15 Sep 2016, at 16:02, DuyHai Doan wrote:
>
> Ok so I've found the source of the issue, it's pretty well hidden because it
> is NOT in the SASI source code directly.
>
201 - 300 of 1112 matches
Mail list logo