question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query returning results when it shouldn't be

See original GitHub issue

CrateDB version: 2.3.2 JVM version: Java 8 (build 1.8.0_152-b16) OS version / environment description: Mac OSX Sierra 10.12.6 (16G29) Problem description: I ran into some weird Crate behavior and I’m wondering if anyone has run into anything like this. If I run the query:

SELECT  geohash, 
        data 
FROM    GRID 
WHERE   (data['pop_census10'] between 4.95 AND 5) 
        AND data['msa'] = 'miami' 
        AND layer = 'pop' 
        AND geohash = 'dhwgpme';

it returns the record:

{
    "geohash": "dhwgpme",
    "data": {
      "housing_census10": 1.4,
      "property_medianvalue": null,
      "property_meanvalue": null,
      "workers_lodes15": 22.4,
      "pop_census10": 4.14,
      "property_count": null,
      "msa": "miami"
    }
}

Based on the conditions:

(data['pop_census10'] between 4.95 AND 5)

Shouldn’t this record be excluded?

Steps to reproduce: Run the query above against data that includes the sample record that was returnbed

Sample record:

{
    "geohash": "dhwgpme",
    "data": {
      "housing_census10": 1.4,
      "property_medianvalue": null,
      "property_meanvalue": null,
      "workers_lodes15": 22.4,
      "pop_census10": 4.14,
      "property_count": null,
      "msa": "miami"
    }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
matrivcommented, Mar 5, 2018

@Broham Issue is reproducible, We will investigate.

0reactions
matrivcommented, Mar 5, 2018

@Broham For more info you could also refer here

Read more comments on GitHub >

github_iconTop Results From Across the Web

My MariaDB MYSQL query is returning results when it shouldn't
I am trying to query both tables for the value and i want PHP to execute a block of code if no result...
Read more >
WordPress WP Query Returns Results When It Shouldn't
What's the fix? It turns out that the query wants (in a manner of speaking) to return results so you need to give...
Read more >
How To Fix WP Query Returns Results But Shouldn't?
Couple of things to consider here: 1.) Try adding the meta query only if the value is present: $pairedThing = get_field('myThing'); $args ...
Read more >
Full-Text query returning results when it shouldn't if the search ...
I have one record in my NameSummary table with the name of "Sam". There are three queries below. I would expect the first...
Read more >
Solved: Re: Using temporary tables in SQL query recipes
I'm using Microsoft SQL Server. I see no reason why this query shouldn't work, but Dataiku throws the error that 'Query does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found