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.

`@fold` support for SQL

See original GitHub issue

Here’s the initial plan for how to handle @fold in SQL. May need additional considerations for interactions with other directives.

https://www.db-fiddle.com/f/cD9aczVx5B8gRiAXavWBhB/3

Let me know what you think @obi1kenobi @bojanserafimov @pmantica1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
bojanserafimovcommented, Sep 17, 2019

https://www.db-fiddle.com/f/4EXkttLVoWTdbMZQBsNDDB/3 I’ve added a Neighborhood with name = NULL. In the first query, it appears as null inside the array (which is correct), but it’s not counted in the _x_count.

Shouldn’t we implement _x_count using count(*) to solve this? It’s also simpler to emit count(*) from the LocalField than it is to emit count(some_column).

1reaction
obi1kenobicommented, Sep 5, 2019

Yeah @chewselene and I were just looking at this as well, and I think we ended up removing the outer GROUP BY since it didn’t seem to be necessary with the subqueries approach. I updated the fiddle to add a new SQL query with the GROUP BY removed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Power Query query folding - Microsoft Learn
Query folding is the ability for a Power Query query to generate a single query statement to retrieve and transform source data. The...
Read more >
Which M functions support SQL code folding?
Relational data source transformations that can be query folded are those that can be written as a single SELECT statement. A SELECT statement...
Read more >
Query Folding On SQL Queries In Power Query Using Value ...
Did you know that there's a way you can get query folding to work if you're using a native SQL query on SQL...
Read more >
Fixing Query Folding with SQL Server in Power BI for ...
Query folding is Power Query's ability to generate a single query expression to retrieve and transform source data. Most SQL-based data sources such...
Read more >
Solved! Query folding for native SQL in Power BI | by Nikola Ilic
If you choose to write custom SQL, all subsequent transformation steps applied in the Power Query Editor will not fold, even if you're...
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