Jappdeveloper Be aware that the SOQL_FIRST and SQL_FIRST parse methods may lead to different behavior for similar queries. This can occur when the driver switches between the two modes when trying to find which query language can support the inputted query. The behavior will be consistent within the same query language, however even small changes to a query can cause the driver to change which language it uses to execute the query, causing different results to be returned.
For example, SOQL and SQL handle comparisons against null values differently. SQL will return an unknown state if a comparison operator (such as = or >) is used with a null value and the result will contain zero rows. SOQL will allow such a comparison and will return results. For example, you issue the query SELECT Name FROM Account WHERE NumberOfEmployees = NULL. This query is valid SOQL, so if you are using the SOQL_FIRST mode the driver executes it in SOQL and returns values containing all non-null values. You then issue the query SELECT Account.Name FROM Account, Contact WHERE Account.Id = Contact.AccountId AND Account.NumberOfEmployees = NULL. This query is not valid SOQL but is valid SQL. The driver executes it in SQL and returns zero values as specified by the SQL specification. Both queries are similar, but the small difference in the query structure results in a different language being used to execute the queries. This changes the results.
If you are expecting a certain behavior, then use either the SOQL_ONLY mode or the SQL_ONLY mode.