Materialized views are executed by spark. So you have to use Spark sql. I sued below link for reference while writing spark sql queries.
We need to use Spark SQL, it is mostly ANSI sql and you can use various functions as per https://spark.apache.org/docs/latest/api/sql/index.html
For eg look at this MV sql -
SELECT ts.ACCOUNT_ID, ts.AMOUNT, ts.AMOUNT_TAXED, ts.COMPLETE_0, CAST(ts.DATE_ARRIVE AS TIMESTAMP) + INTERVAL '8' HOUR AS DATE_ARRIVE, COALESCE(ts.BRAND_ID, it.BRAND_ID) AS CALCULATED_BRAND_ID FROM Test.TRANSACTION_LINES_SOURCE AS ts LEFT OUTER JOIN Test.ITEMS it ON ts.ITEM_ID = it.ITEM_ID WHERE 1=1