Skip to content

Commit

Permalink
omg mysql is green
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoy-googly-moogly committed Nov 29, 2024
1 parent 5fd288c commit 26d1b29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/malloy/src/dialect/mysql/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,14 @@ export class MySQLDialect extends Dialect {
// LTNOTE: we need the type of array here.
fields = "`value` JSON PATH '$'";
}
return `JSON_TABLE(${source}, '$[*]'
return `JSON_TABLE(CAST(${source} AS JSON), '$[*]'
COLUMNS (
__row_id FOR ORDINALITY,
${fields}
)
)`;
}

// LTNOTE: We'll make this work with Arrays once MToy's changes land.
sqlUnnestAlias(
source: string,
alias: string,
Expand Down

0 comments on commit 26d1b29

Please sign in to comment.