KoteiIto/node-athena

TypeError: Cannot read property 'length' of undefined

Closed this issue · 2 comments

This problem appears approximately every time I use execute(sql).toPromise()
After debugging I noticed that error throws in this place

if (this.columns.length === 0) {

TypeError: Cannot read property 'length' of undefined
at AthenaStream. (/var/task/node_modules/athena-client/build/lib/stream.js:93:40)
at next (native)
at fulfilled (/var/task/node_modules/athena-client/build/lib/stream.js:4:58)

The version of athena-client is 2.0.0

In v2.0.0, bugs may occur in parsing csv.
Can you use v2.1.0 or higher.

Thank you.
For anyone with the problem. I installed 2.1.2 version and this error was gone.