Closed lpoulain closed 1 year ago
@lpoulain Can you squash the "fixups" together?
@hashhar done
@lpoulain "All commits" do not need to be squashed. Just the logically related ones.
For future PRs see https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md#git-merge-strategy
@lpoulain Please reword the commit message as:
Optimize experimental_python_types and add type-mapping tests
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 is created to
wrap this behavior.
The experimental_python_types flag is now processed in the TrinoQuery
class instead of the TrinoResult class.
Type mapping tests for each lambda which maps rows to Python types is
added.
Looks good but please reword commit message to have useful information.
@hashhar done
Optimizes the
experimental_python_types
flag. Instead of checking the type for each row, check the type once for eachfetch()
call and compute a list of lambdas which are to be applied to the values from each row.RowMapperFactory
class was created to wrap this behavior. Thecolumns
content from the status is analyzed and a list of lambda functions is created (one lambda per column)experimental_python_types
flag is now processed in theTrinoQuery
class instead of theTrinoResult
class