From 20a6ed88d3ad3ebabb8e1125b12b47b8fe38426a Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 10 Aug 2022 16:13:57 +0100 Subject: [PATCH] Ensure multi-yield path expression alias outputs are flattened Closes #27 --- lib/src/sql/field.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/sql/field.rs b/lib/src/sql/field.rs index a0cee1c5..7521e58b 100644 --- a/lib/src/sql/field.rs +++ b/lib/src/sql/field.rs @@ -107,7 +107,8 @@ impl Fields { .get(ctx, opt, txn, v) .await? .compute(ctx, opt, txn, Some(doc)) - .await?; + .await? + .flatten(); // Add the result to the temporary store res.push((v, x)); } @@ -154,7 +155,8 @@ impl Fields { .get(ctx, opt, txn, v) .await? .compute(ctx, opt, txn, Some(doc)) - .await?; + .await? + .flatten(); // Add the result to the temporary store res.push((v, x)); }