Inability to query underlying table of a schema-bound view
From the documentation:
A query does not have to explicitly reference an indexed view in the
FROM
clause for the Query Optimizer to use the indexed view. If the query contains references to columns in the base tables that are also present in the indexed view, and the Query Optimizer estimates that using the indexed view provides the lowest cost access mechanism, the Query Optimizer chooses the indexed view, similar to the way it chooses base table indexes when they are not directly referenced in a query.
When you have an invalid indexed view in your database, this Enterprise Edition feature can produce errors when the optimizer considers using the indexed view instead of base table access.
This automatic indexed-view matching feature can be disabled with the EXPAND VIEWS
query hint:
EXPAND VIEWS
Specifies the indexed views are expanded. Also specifies the Query Optimizer won't consider any indexed view as a replacement for any query part. A view is expanded when the view definition replaces the view name in the query text.This query hint virtually disallows direct use of indexed views and indexes on indexed views in the query plan.
When you upgraded your database, a warning was emitted:
Warning: The object "ZZZZ" could not be bound and was ignored during upgrade. Consider reviewing and correcting its definition.
This is easy to miss, and may not even be visible to the user in some scenarios. Still, the lesson is clear: A database with invalid objects may produce unexpected errors.
DBCC CHECKDB WITH EXTENDED_LOGICAL_CHECKS
will also detect the problem.
If you need to run the database on SQL Server 2019, use database compatibility level 100 until you are able to resolve the upgrade issues. This will allow datetimes to be added to times using the addition operator.
Regarding when you query the underlying table, perhaps the optimizer produces a plan that uses the view-index instead of the table?
The execution plan should tell you, or try the EXPAND VIEWS hint.