apache / apache/cassandra-gocql-driver

QUERY ACCORDING TO DATE CONDITION

Open
#1,648 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Go
Stars
2.7k
Forks
658
PR merge metrics
No merged PRs in 30d

Description

For example:

**1) lastdate value is static ('2022-08-31 11:08') .**

`iter := Session.Query("SELECT * FROM students where lastdate>'2022-08-31 11:08' and firstname=? ALLOW FILTERING", name).Iter();`

![image](https://user-images.githubusercontent.com/21373505/187858693-07ef7361-b809-426c-bd37-04f01631ae45.png)

**2) lastdate is variable and using in query.**

`lastdate := "2022-08-31 11:08"`

`iter := Session.Query("SELECT * FROM students where lastdate>? and firstname=? ALLOW FILTERING", lastdate, name).Iter()`

![image](https://user-images.githubusercontent.com/21373505/187858576-225071da-ed0c-479f-98ef-00d24df99969.png)

**What is problem in this query?**

Contributor guide

Open the contributing guide

Research direction

Start with the two Session.Query(...).Iter() examples and compare the literal and parameterized lastdate conditions, including the attached screenshots. Reproduce the behavior against Cassandra, then determine whether the issue is in the query or the driver; there is no specific code change or test named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
cassandra, go
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.