# Simple VDS query fails

**URL:** <https://community.dremio.com/t/simple-vds-query-fails/2368>\
**Category:** Uncategorized\
**Created:** [December 3, 2018, 10:09pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368 "2018-12-03T22:09:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 3, 2018, 10:09pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/1 "2018-12-03T22:09:44Z")

</div>

This very simple query fails against VDS which points to a JSON source

Attached query profile:

[8327f4c7-7dcb-44b1-8ba0-92bb0c862eff.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/d/de70037222a00a1033da8125bb7e522aeaeddee2.zip) (43.4 KB)

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 3, 2018, 10:13pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/2 "2018-12-03T22:13:29Z")

</div>

I also ran essentially the same query against our production cluster (many more nodes) and is fails there too:

[3b0ef014-5bc2-4701-8022-71e71397bb5b.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/6/6a875988a0f5e80690f534f3390f0ae5a2a8aa5d.zip) (50.2 KB)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [December 3, 2018, 10:19pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/3 "2018-12-03T22:19:05Z")

</div>

Hi @jhaynie

Can you please try to turn off “planner.experimental.pclean\_logical” and retry the query. Click on Admin-Cluster (on the left)-Right Side support key box- ENter “planner.experimental.pclean\_logical” and click show and hit save

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 3, 2018, 10:22pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/4 "2018-12-03T22:22:17Z")

</div>

> [@balaji.ramaswamy](#):
>
> planner.experimental.pclean\_logical

I turned if off and it still times out. here’s profile if that helps.

[8c5bd497-0806-4ddf-833e-803ee3b27c82.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/9/94ef145a9c60876dd3a64deff0433af90841f64e.zip) (48.2 KB)

Since this is a calculated field from a nested JSON object, I tried making it simple (don’t convert to timestamp etc) and it seems to still fail.

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 3, 2018, 10:41pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/5 "2018-12-03T22:41:36Z")

</div>

instead of the vds, I went against the raw json source and it finishes but it’s super slow (37s). there aren’t many records in these JSON files

[d2c1a4c1-936b-4ce5-a8e5-801b106132ce.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/f/f73c396c6d5818f3654902740a7845089f6b65d9.zip) (10.8 KB)

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 4, 2018, 6:01am UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/6 "2018-12-04T06:01:02Z")

</div>

Seems like \>1 field in where clause causes the problem.

If I used created\_at by itself works fine. If I use another column by itself it works fine. If I use more than 1 column, times out.

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [December 4, 2018, 5:52pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/7 "2018-12-04T17:52:09Z")

</div>

Basically, after many hours of troubleshooting and workarounds, it appears to be related to nested S3 fields being referenced. No matter what I do, anything that is nested seems to not work when used as part of a virtual query. I worked around it in the short-term by flattening the JSON files (so nested becomes NestedA.B.C.D as the name of the key) and it now works.

Seems like there is some sort of problems with nested JSON data structures in queries.

---

<div class="post-metadata">

**Author:** ![shayeny](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@shayeny](https://community.dremio.com/u/shayeny)\
**Post date:** [February 17, 2020, 10:24am UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/8 "2020-02-17T10:24:14Z")

</div>

Is this issue still there? I can unnest (flatten) json data structures without any issues. However, if I try to join the resulting table with any other table, I get an error… @balaji.ramaswamy is there such an issue with nested structures?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [February 17, 2020, 6:46pm UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/9 "2020-02-17T18:46:31Z")

</div>

@shayeny

What is the error? Please [share query profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![shayeny](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@shayeny](https://community.dremio.com/u/shayeny)\
**Post date:** [February 18, 2020, 1:06am UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/10 "2020-02-18T01:06:11Z")

</div>

[fcd6e598-1ddc-4fdc-9ce3-b6cfdc1588b8.zip](https://community.dremio.com/uploads/short-url/qO19n3rHFv8V5hV0XTj2dcHzsWX.zip) (37.9 KB)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [February 18, 2020, 3:04am UTC](https://community.dremio.com/t/simple-vds-query-fails/2368/11 "2020-02-18T03:04:08Z")

</div>

@shayeny

This looks like the same issue as your other [post](https://community.dremio.com/t/issue-with-nested-json-structures/5068)

Thanks,  
Bali
