Skip to content

Commit

Permalink
Merge pull request #8 from Bit-Quill/dialect-expr-logical-AOS205
Browse files Browse the repository at this point in the history
Dialect changes for exprtests
  • Loading branch information
guiangumpac authored Nov 23, 2021
2 parents 8596513 + f212e35 commit 2df3f26
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions sql-jdbc/src/TableauConnector/opensearch_sql_jdbc/dialect.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
<argument type='bool' />
</function>

<function group='logical' name='IFNULL' return-type='datetime'>
<formula>CASE WHEN ISNULL(%1) THEN SUBDATE(TIMESTAMP(%2), INTERVAL HOUR(TIMESTAMP(%2)) HOUR) ELSE %1 END</formula>
<argument type='datetime' />
<argument type='date' />
</function>

<function group='operator' name='!=' return-type='bool'>
<formula>(%1 AND NOT %2 OR NOT %1 AND %2)</formula>
<argument type='bool' />
Expand Down Expand Up @@ -174,6 +180,14 @@
<argument type='datetime' />
<argument type='datetime' />
</function>
<function group='numeric' name='MAX' return-type='str'>
<formula>CASE WHEN ISNULL(%1) THEN NULL
WHEN ISNULL(%2) THEN NULL
WHEN %1 &gt; %2 THEN %1
ELSE %2 END</formula>
<argument type='str' />
<argument type='str' />
</function>
<function group='numeric' name='MIN' return-type='int'>
<formula>CASE WHEN ISNULL(%1) THEN NULL
WHEN ISNULL(%2) THEN NULL
Expand All @@ -198,6 +212,14 @@
<argument type='datetime' />
<argument type='datetime' />
</function>
<function group='numeric' name='MIN' return-type='str'>
<formula>CASE WHEN ISNULL(%1) THEN NULL
WHEN ISNULL(%2) THEN NULL
WHEN %1 &lt; %2 THEN %1
ELSE %2 END</formula>
<argument type='str' />
<argument type='str' />
</function>
<function group='numeric' name='CEILING' return-type='int'>
<formula>CEIL(%1)</formula>
<argument type='real' />
Expand Down Expand Up @@ -358,24 +380,8 @@
<argument type='datetime' />
</remove-function>

<remove-function name='MAX'>
<argument type='str' />
</remove-function>
<remove-function name='MAX'>
<argument type='str' />
<argument type='str' />
</remove-function>

<remove-function name='SPACE'>
<argument type='int' />
</remove-function>

<remove-function name='MIN'>
<argument type='str' />
</remove-function>
<remove-function name='MIN'>
<argument type='str' />
<argument type='str' />
</remove-function>
</function-map>
</dialect>

0 comments on commit 2df3f26

Please sign in to comment.