Skip to content

Added brackets for math operation functions in the TACO #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions bi-connectors/TableauConnector/src/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
</function>
<function group='operator' name='+' return-type='datetime'>
<!-- 86400 as it represents seconds in a day -->
<formula>DATE_ADD(%1, INTERVAL CAST((86400 * %2) AS INT) SECOND)</formula>
<formula>DATE_ADD(%1, INTERVAL CAST((86400 * (%2)) AS INT) SECOND)</formula>
<argument type='datetime' />
<argument type='real' />
</function>
Expand All @@ -210,16 +210,16 @@
</function>
<function group='operator' name='+' return-type='datetime'>
<!-- 86400 as it represents seconds in a day -->
<formula>DATE_ADD(%1, INTERVAL CAST((86400 * %2) AS INT) SECOND)</formula>
<formula>DATE_ADD(%1, INTERVAL CAST((86400 * (%2)) AS INT) SECOND)</formula>
<argument type='date' />
<argument type='real' />
</function>
<function group='operator' name='-' return-type='int'>
<formula>(%1 * -1)</formula>
<formula>((%1) * -1)</formula>
<argument type='int' />
</function>
<function group='operator' name='-' return-type='real'>
<formula>(%1 * -1)</formula>
<formula>((%1) * -1)</formula>
<argument type='real' />
</function>
<function group='operator' name='-' return-type='real'>
Expand All @@ -242,7 +242,7 @@
</function>
<function group='operator' name='-' return-type='datetime'>
<!-- 86400 as it represents seconds in a day -->
<formula>DATE_SUB(%1, INTERVAL CAST((86400 * %2) AS INT) SECOND)</formula>
<formula>DATE_SUB(%1, INTERVAL CAST((86400 * (%2)) AS INT) SECOND)</formula>
<argument type='datetime' />
<argument type='real' />
</function>
Expand All @@ -253,7 +253,7 @@
</function>
<function group='operator' name='-' return-type='datetime'>
<!-- 86400 as it represents seconds in a day -->
<formula>DATE_SUB(%1, INTERVAL CAST((86400 * %2) AS INT) SECOND)</formula>
<formula>DATE_SUB(%1, INTERVAL CAST((86400 * (%2)) AS INT) SECOND)</formula>
<argument type='date' />
<argument type='real' />
</function>
Expand All @@ -263,7 +263,7 @@
<argument type='date' />
</function>
<function group='operator' name='/' return-type='real'>
<formula>CAST(%1 AS DOUBLE) / %2</formula>
<formula>CAST(%1 AS DOUBLE) / (%2)</formula>
<argument type='int' />
<argument type='int' />
</function>
Expand All @@ -273,12 +273,12 @@
<argument type="real" />
</function>
<function group='numeric' name='DIV' return-type='int'>
<formula>CASE WHEN %2 = 0 THEN NULL ELSE ( %1 / %2 ) END</formula>
<formula>CASE WHEN %2 = 0 THEN NULL ELSE ( (%1) / (%2) ) END</formula>
<argument type='int' />
<argument type='int' />
</function>
<function group='numeric' name='DIV' return-type='real'>
<formula>CASE WHEN %2 = 0 THEN NULL ELSE ( %1 / %2 ) END</formula>
<formula>CASE WHEN %2 = 0 THEN NULL ELSE ( (%1) / (%2) ) END</formula>
<argument type='real' />
<argument type='real' />
</function>
Expand Down