athena-cli icon indicating copy to clipboard operation
athena-cli copied to clipboard

Headers are not being properly removed to do being encoded to bytes

Open onlynone opened this issue 7 years ago • 0 comments

I believe this commit: https://github.com/guardian/athena-cli/commit/e88e32f1c72106aed7723d8ad489463679805688 broke the auto-header removal in yield_rows. The issue seems to be that the column names are encoded to 'utf8' in the headers array. This means they'll be a byte string like b'hostname'. But the data columns aren't byte strings, they're unicode strings like u'hostname'. At least in python3, these two values will not compare equal, so yield_rows thinks the first row of data is not the header row and prints it out.

onlynone avatar Aug 24 '18 16:08 onlynone