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.

Table query with parentheses does not find rows.

See original GitHub issue

Which service(blob, file, queue, table) does this issue concern?

Table

Which version of the Azurite was used?

3.14.2

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

What’s the Node.js version?

I’m not sure I use Docker image.

What problem was encountered?

Table query with parentheses e.g.: (PartitionKey eq '1') and (AppId eq 1000002L) does not find rows.

Steps to reproduce the issue?

  1. In Storage Explorer, insert entity image

  2. In Storage Explorer, use query tool to create a query that includes parentheses No rows found.

image

  1. In Storage Explorer, use the same query but without parentheses Records were found. image

We use Microsoft.Azure.Cosmos.Table SDK that wraps the conditions with parentheses.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
edwin-hubercommented, Oct 8, 2021

Thanks, the logic looks sound, and I can add it to the other PR with appropriate tests.

1reaction
Burgyncommented, Oct 8, 2021

😊 The problem seems to be in method tokenizeQuery. The original condition did not take into account int64 with L suffix. Original:

if (i !== 0 && query[i - 1].match(/\d/) !== null)

my “naive, without refactor, but functional” implementation looks like this:

if (
  (i !== 0 && query[i - 1].match(/\d/) !== null) ||
  (i - tokenStart > 0 &&
    query.substring(tokenStart, i).match(/\b[0-9]+L\b/g) != null)
)

I had a problem running the tests. ERROR: --compilers is DEPRECATED and no longer supported. I’m not NodeJs guy 🙄.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create table with query but it shows me syntax error where the ...
CREATE TABLE [dbo].[Cart] { should not with curly braces, it should be with parentheses () . And NOTNULL should be NOT NULL
Read more >
Documentation: 15: 7.2. Table Expressions - PostgreSQL
Parentheses can be used around JOIN clauses to control the join order. ... Then, for each row in T1 that does not satisfy...
Read more >
Access Data in Tables - MATLAB & Simulink - MathWorks
Indexing into tables with parentheses, dot notation, and curly braces accesses table ... The rows of a table can have names, but row...
Read more >
Query syntax in Google Standard SQL | Cloud Spanner
The query above produces a table with row type STRUCT<a int64, b int64> . Example: SELECT AS ... You cannot write comma cross...
Read more >
SQL Subqueries - w3resource
The SQL subquery is a SELECT query that is embedded in the main SELECT ... to the outer query, the outer query will...
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