Description
When Spark's ConstantFolding optimizer rule is disabled, an all-literal sha2() call reaches the native engine, which crashes with:
Unsupported argument types for sha2 function
How to Reproduce
SET spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.ConstantFolding;
SELECT sha2('test', 256);
Expected Behavior
The native engine should handle literal sha2 inputs gracefully — either by computing the correct result or by falling back to Spark.