betodealmeida / shillelagh

Making it easy to query APIs via SQL
MIT License
374 stars 50 forks source link

fix(gsheets): handle getting values from rows in wide tables #426

Closed jokoerner closed 5 months ago

jokoerner commented 5 months ago

Summary

get_values_from_row had a flaw that would result in a wrong value for n_cols under certain conditions. n_cols is expected to be the result of get_index_from_letters for the "highest letter" column. However, using max to get the "highest letter" column is not feasible as max("Z", "AA") == "Z". To fix this, get_index_from_letters is called on all values of column_map to make sure that we find the correct n_cols.

Testing instructions

The unit test for get_values_from_row have been updated to cover this change as well.

betodealmeida commented 5 months ago

@jokoerner do you want to add yourself to AUTHORS.rst?

jokoerner commented 5 months ago

@jokoerner do you want to add yourself to AUTHORS.rst?

Sure, thanks!