Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fromPrimitive_TIMESTAMP_MICROS bug (TypeError when dividing a string by BigInt) #58

Open
Irelynx opened this issue Dec 20, 2020 · 2 comments

Comments

@Irelynx
Copy link

Irelynx commented Dec 20, 2020

Hello!

I am trying to read some parquet files containing timestamps in micro-seconds, but cursor.next() throws an TypeError: Cannot mix BigInt and other types, use explicit conversions

In fromPrimitive_TIMESTAMP_MICROS(value: String): Date, value (string) divided by 1000n (BigInt), which causes this TypeError.

I am using Node v12.19.1 on Windows 10 (i think OS doesn't matter here..)

@ena-so
Copy link

ena-so commented Jan 4, 2022

I'm also having the same issue. When I try to iterate through the cursor it says "Cannot mix BigInt and other types, use explicit conversions".

This is what I get when I print the TIMESTAMP unit from the schema object. { MILLIS: null, MICROS: {} }

Here is the full schema of the column

{
  type: 2,
  type_length: null,
  repetition_type: 1,
  name: 'timestamp',
  num_children: null,
  converted_type: 10,
  scale: null,
  precision: null,
  field_id: null,
  logicalType: {
    STRING: null,
    MAP: null,
    LIST: null,
    ENUM: null,
    DECIMAL: null,
    DATE: null,
    TIME: null,
    TIMESTAMP: { isAdjustedToUTC: false, unit: [Object] },
    INTEGER: null,
    UNKNOWN: null,
    JSON: null,
    BSON: null
  }
}

@benheb
Copy link

benheb commented Jul 15, 2022

Anyone find a solution here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants