[CALCITE-282] Add {fn QUARTER(date)} function (Benoy Antony)
Fix QUARTER function for null values and JDBC escape syntax