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.

Queries with nested fields for presto fail with " 'The number of data values and number of nestedfields are not equal'"

See original GitHub issue

A clear and concise description of what the bug is. When querying a deeply nested field in presto, a “The number of data values and number of nestedfields are not equal’” error. This appears related to http://mail-archives.apache.org/mod_mbox/superset-notifications/201905.mbox/<155925893590.16760.17217802552102811180.gitbox@gitbox.apache.org>

Expected results

The data

Actual results

Exception: ‘The number of data values and number of nestedfields are not equal’

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. Query a deeply nested field (a row of array of row) in sql lab
  2. If the rows have different shape, i.e. one is null, the other has data only the shape of the first row determines the data.
  3. The code comes from ./superset/db_engine_specs/presto.py in the _expand_row_data function.

Environment

(please complete the following information):

  • superset version: 0.34.1rc1
  • python version: python --version 3.6
  • node.js version: node -v
  • npm version: npm -v

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [X ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [ X] I have reproduced the issue with at least the latest released version of superset.
  • [ X] I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
willbarrettcommented, Nov 6, 2019

Hi @elonazoulay - feel free to contribute that fix back to core. Thanks for digging in!

1reaction
issue-label-bot[bot]commented, Sep 27, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Queries with nested fields for presto fail with " 'The number of ...
When querying a deeply nested field in presto, a "The number of data values and number of nestedfields are not equal'" error.
Read more >
How to query nested fields in MongoDB using Presto
Just by plugging it, Presto correctly identifies and creates columns for the values in the top level (e.g. somefield , otherfield ) and...
Read more >
SELECT — Presto 0.278.1 Documentation
It allows flattening nested queries or simplifying subqueries. For example, the following queries are equivalent: SELECT a, b FROM ( SELECT a, ...
Read more >
Querying arrays with complex types and nested structures
Your source data often contains arrays with complex data types and nested structures. Examples in this section show how to change element's data...
Read more >
Faster Queries on Nested Data - Trino
Presto 334 adds significant performance improvements for queries accessing nested fields inside struct columns. They have been optimized ...
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