Skip to content

Commit

Permalink
Fix SQL list generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Feb 12, 2024
1 parent 48bc143 commit 681ff18
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vegafusion-sql/src/compile/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ impl ToSqlScalar for ScalarValue {
value: "make_list".to_string(),
quote_style: None,
};

let args = (0..array.len())
.map(|i| {
let v = array.value(0).to_scalar_vec()?;
let sql_expr = v[i].to_sql(dialect)?;
let args = array
.value(0)
.to_scalar_vec()?
.into_iter()
.map(|v| {
let sql_expr = v.to_sql(dialect)?;
Ok(SqlFunctionArg::Unnamed(FunctionArgExpr::Expr(sql_expr)))
})
.collect::<Result<Vec<_>>>()?;
Expand Down

0 comments on commit 681ff18

Please sign in to comment.