Diffing a table with an empty list throws wrong error
See original GitHub issueIt 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:
- Created 12 years ago
- Comments:7 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue had already been resolved at some undetermined time in the past.
@mlvandijk thanks for investigating!
@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.