You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by Priyanka Gugale <pr...@apache.org> on 2016/01/27 12:53:05 UTC
Cassandra query start value
Hi,
CassandraPOJOInputOpeartor in Malhar accepts query in the form:
"select * from %t where token(%p) > %s limit %l"
Where %s is start value.
*What is "start value" here?*
>From javadoc in code it looks like %s is the row number in table from where
you want to start scan. But looking at code it should be "primaryKeyValue"
of row from where you want to start scan. (I didn't find any way in cql to
scan starting from some row number, unless you have rowNumber column in
your table.)
If this understanding is correct we should rename this to something like
startRowPrimaryKey and update javadoc.
-Priyanka
Re: Cassandra query start value
Posted by Pramod Immaneni <pr...@datatorrent.com>.
I see the change makes sense
On Wed, Jan 27, 2016 at 10:13 PM, Priyanka Gugale <pr...@datatorrent.com>
wrote:
> The startRow purpose is as you explained, but the value assigned to it is
> not serving the right purpose. As per my understanding the value should be
> value of primary key of start row. I had to read through code to understand
> that. A meaningful name and right javadoc will make it easy to understand.
>
> -Priyanka
>
> On Wed, Jan 27, 2016 at 9:40 PM, Pramod Immaneni <pr...@datatorrent.com>
> wrote:
>
> > Priyanka the start in the query should act like a cursor and keep
> > getting updated when new data is pulled in and that's possible the
> > reason for that name. Is that not happening?
> >
> > > On Jan 27, 2016, at 3:53 AM, Priyanka Gugale <pr...@apache.org>
> wrote:
> > >
> > > Hi,
> > >
> > > CassandraPOJOInputOpeartor in Malhar accepts query in the form:
> > > "select * from %t where token(%p) > %s limit %l"
> > > Where %s is start value.
> > >
> > > *What is "start value" here?*
> > > From javadoc in code it looks like %s is the row number in table from
> > where
> > > you want to start scan. But looking at code it should be
> > "primaryKeyValue"
> > > of row from where you want to start scan. (I didn't find any way in cql
> > to
> > > scan starting from some row number, unless you have rowNumber column in
> > > your table.)
> > >
> > > If this understanding is correct we should rename this to something
> like
> > > startRowPrimaryKey and update javadoc.
> > >
> > > -Priyanka
> >
>
Re: Cassandra query start value
Posted by Priyanka Gugale <pr...@datatorrent.com>.
The startRow purpose is as you explained, but the value assigned to it is
not serving the right purpose. As per my understanding the value should be
value of primary key of start row. I had to read through code to understand
that. A meaningful name and right javadoc will make it easy to understand.
-Priyanka
On Wed, Jan 27, 2016 at 9:40 PM, Pramod Immaneni <pr...@datatorrent.com>
wrote:
> Priyanka the start in the query should act like a cursor and keep
> getting updated when new data is pulled in and that's possible the
> reason for that name. Is that not happening?
>
> > On Jan 27, 2016, at 3:53 AM, Priyanka Gugale <pr...@apache.org> wrote:
> >
> > Hi,
> >
> > CassandraPOJOInputOpeartor in Malhar accepts query in the form:
> > "select * from %t where token(%p) > %s limit %l"
> > Where %s is start value.
> >
> > *What is "start value" here?*
> > From javadoc in code it looks like %s is the row number in table from
> where
> > you want to start scan. But looking at code it should be
> "primaryKeyValue"
> > of row from where you want to start scan. (I didn't find any way in cql
> to
> > scan starting from some row number, unless you have rowNumber column in
> > your table.)
> >
> > If this understanding is correct we should rename this to something like
> > startRowPrimaryKey and update javadoc.
> >
> > -Priyanka
>
Re: Cassandra query start value
Posted by Pramod Immaneni <pr...@datatorrent.com>.
Priyanka the start in the query should act like a cursor and keep
getting updated when new data is pulled in and that's possible the
reason for that name. Is that not happening?
> On Jan 27, 2016, at 3:53 AM, Priyanka Gugale <pr...@apache.org> wrote:
>
> Hi,
>
> CassandraPOJOInputOpeartor in Malhar accepts query in the form:
> "select * from %t where token(%p) > %s limit %l"
> Where %s is start value.
>
> *What is "start value" here?*
> From javadoc in code it looks like %s is the row number in table from where
> you want to start scan. But looking at code it should be "primaryKeyValue"
> of row from where you want to start scan. (I didn't find any way in cql to
> scan starting from some row number, unless you have rowNumber column in
> your table.)
>
> If this understanding is correct we should rename this to something like
> startRowPrimaryKey and update javadoc.
>
> -Priyanka