[ 
https://issues.apache.org/jira/browse/CASSANDRA-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219190#comment-16219190
 ] 

Andrés de la Peña commented on CASSANDRA-13817:
-----------------------------------------------

I have tested this with the provided schema and dataset in a 3.10 single-node 
cluster:
{code}
public static void main(String[] args)
{
    Cluster cluster = Cluster.builder().addContactPoint("localhost").build();
    Session session = cluster.newSession();

    // Get the names and their number of occurrences
    Map<String, Integer> names = session.execute("SELECT name FROM k.player")
                                        .all()
                                        .stream()
                                        .map(row -> row.getString("name"))
                                        
.collect(Collectors.toConcurrentMap(name -> name, name -> 1, Integer::sum));

    // For each name, verify that the query returns the same number of 
occurrences
    PreparedStatement query = session.prepare("SELECT * FROM k.player WHERE 
name=? ALLOW FILTERING");
    names.forEach((name, occurrences) -> {
        if (session.execute(query.bind(name)).all().size() != occurrences)
            throw new RuntimeException("Error at name: " + name);
    });

    session.close();
    cluster.close();
}
{code}
The test is able to retrieve each of the 1580 names in the provided CSV file 
(there is a single id per name). Could you please run this test in your cluster?

> cassandra allow filtering bug
> -----------------------------
>
>                 Key: CASSANDRA-13817
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13817
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL, Libraries
>            Reporter: wang huatao
>            Assignee: Andrés de la Peña
>              Labels: allow-filtering
>             Fix For: 3.10
>
>         Attachments: player_201708301613.csv
>
>
> I have one bug about cassandra cql, when I use  select * from table where 
> name = 'myName' alllow filtering,  sometimes can be found, but sometimes can 
> not found. I am very sure the row data existed. my data was very small, just 
> 2000 rows.and only one node.   i use cassandra 3.10, ubuntu 14.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to