Git Product home page Git Product logo

Comments (4)

jtnelson avatar jtnelson commented on August 21, 2024
[default/cash]$ find("location = 'Atlanta \\(HQ\\)'")
Returned '[]' in 0.007 sec

If the phrase with the parens is quoted, then it parses, but the wrong result is returned because the CCL Parser alters all parens to have a space before and after

public static Queue<PostfixNotationSymbol> toPostfixNotation(String ccl) {
        // This method uses a value buffer to correct cases when a string value
        // is specified without quotes (because its a common mistake to make).
        // If an operator other than BETWEEN is specified, we use logic that
        // will buffer all the subsequent tokens until we reach a (parenthesis),
        // (conjunction) or (at) and assume that the tokens belong to the same
        // value.
        ccl = ccl.replace("(", "( ");
        ccl = ccl.replace(")", " )");

from concourse.

jtnelson avatar jtnelson commented on August 21, 2024

The reason that the parens are padded with spaces is so that they are split and handled as separate tokens. We could add an option to the StringSplitter to split on and return parens...

from concourse.

jtnelson avatar jtnelson commented on August 21, 2024

...or we could fix the regex to only do the replace on parens that

  • are not escaped (so not preceeded by '')
  • and are proceeded by whatever characters are allowed to be in a key ([A-Za-z0-9_])

from concourse.

jtnelson avatar jtnelson commented on August 21, 2024

Actually, if we add this logic to StringSplitter we won't need to deal with escaping the parens. The QuoteAware string splitter won't split or apply any of the options within quotes

from concourse.

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.