trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

Optimize the experimental python types flag

Open lpoulain opened this issue 3 years ago • 0 comments

Optimizes the experimental_python_types flag. Instead of checking the type for each row, check the type once for each fetch() call and compute a list of lambdas which are to be applied to the values from each row.

  • A new RowMapperFactory class was created to wrap this behavior. The columns content from the status is analyzed and a list of lambda functions is created (one lambda per column)
  • The experimental_python_types flag is now processed in the TrinoQuery class instead of the TrinoResult class

lpoulain avatar Jul 21 '22 20:07 lpoulain