locationtech / locationtech/geomesa

CQL filters `foo LIKE 'A%'` and `foo LIKE 'A%%'` should behaving consistently

Open
#6,930 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.5k
Forks
446
Avg merge
1d 8h
Merged PRs (30d)
31

Description

CQL filters foo LIKE 'A%' and foo LIKE 'A%%' should behaving consistently

cql filter with foo LIKE 'A%'taking very very long and often timing out vs foo LIKE 'A%%' coming back instantly

Emilio Lahr-Vivaz @emilio.lahr-vivaz
3:16 PM
yeah, another thing i thought of is if geomesa isn't handling the wildcards right they might go to different indices, which could make a difference
we look for a trailing wildcard so if they're multiple that might not pass the check and go to z3 instead


Original JIRA Issue: https://geomesa.atlassian.net/browse/GEOMESA-3104

Key: GEOMESA-3104
Type: Bug
Priority: Major
Status: To Do
Resolution: Unresolved
Reporter: Austin Heyne
Created: Mon, 19 Jul 2021 16:19:28 -0400
Updated: Mon, 20 Sep 2021 08:54:41 -0400


Comments:

557058:48912df4-0004-4f90-9915-db26684ec006 (Wed, 21 Jul 2021 16:30:34 -0400):

The user reported that the query ‘like b%’ was using an attribute index while ‘like b%%’ was using the z3 index (without considering the attribute index).

Options involve a) working on the CBO b) having the user specify the index when querying via query params. Other suggestions?

557058:da7f6dfa-f0a1-468b-aec5-2cb61273feb5 (Mon, 20 Sep 2021 08:54:41 -0400):

% is like * right? so there’s no difference between ‘b%’ and ‘b%%’?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CQL LIKE filter handling and the cost-based optimizer's choice between the attribute and Z3 indexes. Reproduce the foo LIKE 'A%' and foo LIKE 'A%%' queries and compare their index paths. Done means equivalent wildcard filters select an appropriate, consistent index and the timeout discrepancy is covered by regression tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.