question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Diffing a table with an empty list throws wrong error

See original GitHub issue

It currently fails with a java.lang.IndexOutOfBoundsException in checkColumns(DataTable a, DataTable b) where it compares dimensions. Instead it should fail with a TableDiffException showing all rows as missing.

Special care should be taken in the (unlikely) event that the table also has 0 rows. In that case the diff should not raise (empty==empty).

@cedric-lamalle assigning this to you to check if you’re still interested in helping out. If not, just give me a nod.

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mpkorstanjecommented, Aug 11, 2017

This issue had already been resolved at some undetermined time in the past.

@mlvandijk thanks for investigating!

1reaction
mlvandijkcommented, Aug 10, 2017

@mpkorstanje It contains a test that diffs a non-empty table with an empty list (and throws the expected TableDiffException. I’ve added tests to verify empty DataTable throws same Exception, and diffing empty List with empty Table does not. Will create a PR containing those tests.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty IN clause parameter list in MySQL - Stack Overflow
This can be problematic because id IN (NULL) evaluates to NULL and not FALSE . That's mostly a problem for NOT IN :...
Read more >
Is it Really Better to 'Return an Empty List Instead of null ...
Proponents of this rule argue that there are two considerable advantages: You eliminate the risk of a null pointer error (i.e. ...
Read more >
Solved: Pyspark: Table Dataframe returning empty records f...
If I try to create a Dataframe out of them, no errors. But the Column Values are NULL, except from the "partitioning" column...
Read more >
Null List VS Empty List - apex - Salesforce Stack Exchange
The reason such an assignment would throw an error is the query has to return exactly one row for it to work. Having...
Read more >
Creating and Throwing Exceptions | Microsoft Learn
Exceptions are used to indicate that an error has occurred while ... void CopyObject(SampleClass original) { _ = original ?? throw new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found