Code Monkey home page Code Monkey logo

Comments (7)

iwpnd avatar iwpnd commented on July 21, 2024

Good catch. Can confirm. 👍

from tile38.

unendingblue avatar unendingblue commented on July 21, 2024

Thanks for looking into this @iwpnd. After looking around a bit more, I am now certain that this issue has deeper roots than I originally anticipated.

Apart from FSET, this issue is also present in NEARBY's WHEREIN. I assume the reason is this function's use of ToLower:

func (s *Server) cmdSearchArgs(

To reproduce:
SET user 1 FIELD TEST 123 POINT 90 90
NEARBY user POINT 90 90 -> Observe the key is found
NEARBY user WHEREIN TEST 1 123 POINT 90 90 -> Observe the key is not found

SET user 2 FIELD test 123 POINT 90 90
NEARBY user WHEREIN TEST 1 123 POINT 90 90 -> Observe the key is found, even though the search term is uppercase while the key's field name is lowercase

The WHERE search option does work correctly. To confirm:
NEARBY user WHERE TEST 123 123 POINT 90 90 -> Observe the correct key (user 1) is found
NEARBY user WHERE test 123 123 POINT 90 90 -> Observe the correct key (user 2) is found

This is related to issue #704. The fixes for both FSET and WHEREIN may be a breaking change for systems that have not noticed this bug, though I still do believe ironing it out is the way to go as the current behavior is inconsistent.

from tile38.

iwpnd avatar iwpnd commented on July 21, 2024

Can also confirm. Let's see whats going on with wherein 👀

update:
yes, whereins are appended with strings.ToLower(name) too, here.

Can I address this @tidwall? It doesn't appear to be intended, considering you can set a field in just about any case. Also this would align the behaviour of WHEREIN and WHERE.

from tile38.

tidwall avatar tidwall commented on July 21, 2024

@iwpnd yes please take a look. I don’t recall this being the intended behavior.

from tile38.

iwpnd avatar iwpnd commented on July 21, 2024

#742 and #743 should resolve this now @tidwall

from tile38.

tidwall avatar tidwall commented on July 21, 2024

Ok, I'll review asap.

from tile38.

tidwall avatar tidwall commented on July 21, 2024

Fixed and merged!
@unendingblue Thanks for reporting!
@iwpnd Thanks for fixing!

from tile38.

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.