Oracle Solution for Error ora-30357

Solution for Oracle Error ORA-30357

ORA-30357: this PL/SQL function cannot be supported for query rewrite

What triggered the Error:

The statement referenced a PL/SQL function that is not marked DETERMINISTIC.

What should we do to fix it:

Perform one of the following actions: *- Remove the use of the PL/SQL function. *- Mark the PL/SQL function as DETERMINISTIC. *- Disable the REWRITE option on the materialized view. The function should be marked DETERMINISTIC only if it always returns the same result value for any given set of input argument values, regardless of any database state or session state. Do not mark the function as DETERMINISTIC if it has any meaningful side-effects.