Skip to content

Conversation

@halflings
Copy link
Contributor

@halflings halflings commented Dec 26, 2021

Accessing a column that has null values crashes in the latest version of danfojs, e.g for a dataframe:

df = DataFrame([{b: 5}, {a: 12, b:3}, {b:2}])

Accessing df["a"] would crash on isObject looking for a constructor for the null value.

It's odd because I found a previous pull request fixing this:
#208
Not sure why this regression was introduced.

I also tried adding a test to catch such regressions in the future but noticed all columns' tests are commented out in:
tests/core/frame.js

Is that a temporary measure? Having all of those commented out might let such errors slip in in future releases.

@risenW
Copy link
Member

risenW commented Dec 27, 2021

Accessing a column that has null values crashes in the latest version of danfojs, e.g for a dataframe:

df = DataFrame([{b: 5}, {a: 12, b:3}, {b:2}])

Accessing df["a"] would crash on isObject looking for a constructor for the null value.

It's odd because I found a previous pull request fixing this: #208 Not sure why this regression was introduced.

I also tried adding a test to catch such regressions in the future but noticed all columns' tests are commented out in: tests/core/frame.js

Is that a temporary measure? Having all of those commented out might let such errors slip in in future releases.

Thanks for the fix! I'll review and merge. Regarding the commented-out test, It must have been a mistake, I'll uncomment them and ensure they pass now.

@risenW risenW merged commit 516be67 into javascriptdata:dev Dec 28, 2021
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

Successfully merging this pull request may close these issues.

2 participants