Giter Site home page Giter Site logo

Comments (2)

joyant avatar joyant commented on June 4, 2024

The series filtering operator in Lindb considers it an error when a tag value does not exist. In such cases, SeriesIDsAfterFiltering is empty, resulting in an empty query result.

This may seem a bit illogical, as in the case of a nonexistent specified tag value, it might be better to query for all tag values. However, another perspective could be that the person writing the query should be aware of the tag values associated with the metric, and entering incorrect tag values is not desirable.

If @stone1100 believe this is a bug, I can fix it.

from lindb.

stone1100 avatar stone1100 commented on June 4, 2024

Maybe the root cause is not cache tag filter results in query context when tag value not found doing tag filter.
https://github.com/lindb/lindb/blob/main/query/operator/tag_values_lookup.go#L73-L79

After that will get error when do series filter.

return 0, nil, fmt.Errorf("%w, expr: %s", constants.ErrTagValueFilterResultNotFound, expr.Rewrite())

I think cache an empty tag filter result can fix this bug. (https://github.com/lindb/lindb/blob/main/query/operator/tag_values_lookup.go#L73-L79)

The not expression filter logic as below:

  1. tag value filter and get tag value ids A => node in('local')
  2. series ids filter based on tag value ids <- go error
  3. get all series ids by tag key(node)
  4. do Bitmap NotAnd operator

@joyant

from lindb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.