wren-engine
wren-engine copied to clipboard
test(ibis): add supporting functions test for BigQuery data source
Description
We need to have a white list of functions for each data source. In this PR, we add function tests for BigQuery according to trino functions list to check what we can use.
In this PR, I commanded out the unsupported functions. They can't handled well by sqlglot.
We won't merge this PR because there're some issues about formatting trino SQL and the tests aren't qualified.
Test Result - Function White List
Date and Time Functions
current_datecurrent_timestampdatedate_adddate_diffdate_formatdate_parsedate_truncfrom_unixtimenow
Aggregate Functions
any_valueapprox_distinctarbitraryarray_aggavgbool_andbool_orcountcount_ifmaxmax_byminmin_bysum
Math Functions
greatestleastabsacosasinatanatan2cbrtceilcoscoshexpflooris_nanlnloglog10modpowerroundsignsinsinhsqrttantanh
String Functions
chrconcatformatlengthlowerlpadltrimreplacereverserpadrtrimsoundexsplitsubstrsubstringtranslatetrimupper
Operators
- Arithmetic Operators:
+,-,*,/,% - Array Access Operator:
[] - Concatenation Operator:
|| - Comparison Operators:
<,>,<=,>=,=,<>,!=
Thanks @goldmedal. Would you mind adding comments or descriptions for codes that are commented out to explain what happened to them?