Giter Site home page Giter Site logo

Comments (4)

akshaisarma avatar akshaisarma commented on May 22, 2024

Comparing to other fields requires us to address casting (see #37):

  1. We should make the filter clause values, a List[String] to a List[Object] (we can support List[String] for backward compatible)
  2. When we see List[String], we make it into:
{
   "value": "the string value"
}

as below.
3. The Object in the List[Object] is now a new object:

{
   "kind": "VALUE | CAST | FIELD"
   "value": "a string value as before",
   "type": "BOOLEAN, STRING, LONG, INTEGER, DOUBLE, FLOAT"
}

If the kind is:
a. VALUE or is not present, we treat it as a string as before.
b. CAST, we use type to cast the value to the requisite type
c. FIELD, we treat value as a field and extract from the object to compare it the field. If types don't match, we convert the value to the type of the other field (the LHS)

from bullet-core.

akshaisarma avatar akshaisarma commented on May 22, 2024

For c, we're going to follow Java's widening conventions. If the LHS is narrower than the RHS, then the cast will fail but since it's a field also, the query can always be rewritten to swap the RHS with the LHS (making the RHS the narrower one now)

from bullet-core.

akshaisarma avatar akshaisarma commented on May 22, 2024

@hbxie Let's keep this open till casting is implemented too.

from bullet-core.

akshaisarma avatar akshaisarma commented on May 22, 2024

Instead of having a CAST kind, a new field called type was added instead, if when specified is used to cast

from bullet-core.

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.