Teiid doesn't handle NULL values right in UCASE,LCASE and SUBSTRING functions when working with mongodb. It preserves mongo's results, which are different from what is expected from SQL function. Further description is in linked JIRA TEIID-3598.
Ramesh Reddy <rareddy> updated the status of jira TEIID-3598 to Resolved
This has been fixed upstream on the Teiid 8.12 branch.
Steven Hawkins <shawkins> updated the status of jira TEIID-3598 to Closed