When a query contains timestamp operations like DAYOFMONTH, DAYOFWEEK,.. and these are executed when some cells contain null (or missing field), MongoDB throws an exception. This exception is not handled by Teiid in any way and will fail the whole VDB query:
Perhaps Teiid could work around this somehow so that the VDB query will not fail and affected cells will contain null in the result?
For example, this Mongo aggregation pipeline which extracts hours from timestamps:
could be transformed to this:
after this transformation, the hour field will be null as expected for documents where DATEVALUE is null or missing completely