melgenek opened a new issue, #5147:
URL: https://github.com/apache/arrow-datafusion/issues/5147

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   I want to resolve https://github.com/apache/arrow-datafusion/issues/4335 and 
would like to write Postgres compatibility tests that show which types both 
DataFusion and Postgres have.
   
   In sqllogictest tests I could write a query for Datafusion like this one
   ```
   select arrow_typeof(null and null), arrow_typeof(null or null);
   ```
   
   I would like to write the same query for Postgres so that not only value are 
checked for compatibility but also types
   ```
   select pg_typeof(null and null), pg_typeof(null or null);
   ```
   
   Currently, this query cannot be executed by the Postgres sqllogictest 
engine, because it doesn't support `REGTYPE`.
   
   **Describe the solution you'd like**
   
   I'd like to update the Postgres sqllogictest [engine 
implementation](https://github.com/apache/arrow-datafusion/blob/7e948269fb8c85601ed77244f26b9ff2b917cb5c/datafusion/core/tests/sqllogictests/src/engines/postgres/mod.rs#L248)
 to handle the `Type::REGTYPE`.
   
   **Describe alternatives you've considered**
   
   It is possible write an sql query that compares types in sql rather than in 
sqllogictest
   ```
   select pg_typeof(null and null) = 'bool'::regtype;
   ```
   
   I'd say having as many types as possible in the Postgres sqllogictest engine 
makes it a more flexible tool to write compatibility tests, so adding `regtype` 
doesn't hurt.
   
   **Additional context**
   N/A


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to