[
https://issues.apache.org/jira/browse/BEAM-6324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16805856#comment-16805856
]
Shahar Frank commented on BEAM-6324:
------------------------------------
I can do that.
The thing is I think it's the wrong direction to go.
Either we go for a complete freestyle API like `withQuery` or a "builder" style
API like withTable,withWhere,withSelect etc...
I think the mix would only cause problems.
The current implementation will not allow using all queries e.g. try adding
"ALLOW FILTERING" at the end.
In general - of the entire spec:
{code:java}
select_statement ::= SELECT [ JSON | DISTINCT ] ( select_clause | '*' )
FROM table_name
[ WHERE where_clause ]
[ GROUP BY group_by_clause ]
[ ORDER BY ordering_clause ]
[ PER PARTITION LIMIT (integer | bind_marker) ]
[ LIMIT (integer | bind_marker) ]
[ ALLOW FILTERING ]
{code}
Only the first optional WHERE clause is supported.
I really think at this point we can contemplate porting a QueryBuilder.
This would allow to safely validate these values while still support the full
functionality of CQL.
WDYT?
> CassandraIO.Read - Add the ability to provide a filter to the query
> -------------------------------------------------------------------
>
> Key: BEAM-6324
> URL: https://issues.apache.org/jira/browse/BEAM-6324
> Project: Beam
> Issue Type: Improvement
> Components: io-java-cassandra
> Reporter: Shahar Frank
> Assignee: Shahar Frank
> Priority: Major
> Labels: performance, pull-request-available, triaged
> Fix For: Not applicable
>
> Time Spent: 12h 50m
> Remaining Estimate: 0h
>
> CassandraIO.Read doesn't support using WHERE to filter the input at the
> source (In Cassandra) which might provide great performance boost.
> Already implemented by:
> https://github.com/apache/beam/pull/7340
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)