diff --git a/ibis-server/resources/function_list/snowflake.csv b/ibis-server/resources/function_list/snowflake.csv index 338c72fc4..67ea88bed 100644 --- a/ibis-server/resources/function_list/snowflake.csv +++ b/ibis-server/resources/function_list/snowflake.csv @@ -13,8 +13,8 @@ scalar,base64_encode,string,"Encodes binary to base64" scalar,base64_decode,binary,"Decodes base64 to binary" scalar,char,string,"Returns character from ASCII code" scalar,charindex,numeric,"Returns position of substring" -scalar,date_add,timestamp,"Adds interval to date" -scalar,date_sub,timestamp,"Subtracts interval from date" +scalar,dateadd,timestamp,"Adds the specified value for the specified date or time part to a date, time, or timestamp." +scalar,datediff,integer,"Calculates the difference between two date, time, or timestamp expressions based on the date or time part requested. The function returns the result of subtracting the second argument from the third argument." scalar,dayname,string,"Returns name of day" scalar,dayofmonth,numeric,"Returns day of month (1-31)" scalar,dayofweek,numeric,"Returns day of week (0-6)" @@ -47,6 +47,9 @@ scalar,split,array,"Splits string into array" scalar,startswith,boolean,"Tests if string starts with prefix" scalar,time_slice,timestamp,"Truncates timestamp to interval" scalar,timeadd,timestamp,"Adds interval to timestamp" +scalar,timediff,interval,"Calculates difference between two timestamps" +scalar,timestampadd,timestamp,"Adds interval to timestamp" +scalar,timestampdiff,interval,"Calculates difference between two timestamps" scalar,to_array,array,"Converts value to array" scalar,to_json,string,"Converts to JSON string" scalar,to_number,numeric,"Converts to number" diff --git a/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py b/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py index 633410c91..18a2e5f11 100644 --- a/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py +++ b/ibis-server/tests/routers/v3/connector/snowflake/test_functions.py @@ -53,7 +53,7 @@ async def test_function_list(client): response = await client.get(url=f"{base_url}/functions") assert response.status_code == 200 result = response.json() - # assert len(result) == DATAFUSION_FUNCTION_COUNT + 60 + assert len(result) == DATAFUSION_FUNCTION_COUNT + 63 the_func = next(filter(lambda x: x["name"] == "is_null_value", result)) assert the_func == { "name": "is_null_value",