Skip to content

Commit

Permalink
[b/328439985] Convert negative SQRT operands to NULL in dialect.tdd (#44
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tanclary authored Mar 11, 2024
1 parent dee1399 commit 7f5651d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connector/tableau/looker-jdbc/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
<argument type='real' />
</function>
<function group='numeric' name='SQRT' return-type='real'>
<formula>SQRT(%1)</formula>
<!-- BQ throws an error on negative numbers, instead we want NULL. -->
<formula>SQRT(IF(%1 < 0, NULL, %1))</formula>
<argument type='real' />
</function>
<function group='numeric' name='SQUARE' return-type='real'>
Expand Down

0 comments on commit 7f5651d

Please sign in to comment.