enso-org / enso

Enso Analytics is a self-service data prep and analysis platform designed for data teams.
https://ensoanalytics.com
Apache License 2.0
7.38k stars 323 forks source link

Add `cause` to `No_Output_Columns` error to make it clearer what was the _underlying_ cause of the lack of columns and improve the error message #7635

Closed radeusgd closed 11 months ago

radeusgd commented 1 year ago

As discussed in another PR, we want to add a cause field to the No_Output_Columns type. If the lack of output columns (which usually is a hard error) is caused by other problems (which may only be reported at warning level), the hard error is taking precedence - but it is often not stating the true issue that has occurred - the warnings are what is more helpful.

So to ensure that the user can more easily know what has happened, we should add a cause field to No_Output_Columns error and try to fill it in wherever possible.

No_Output_Columns.to_display_text should also include a text representation of the cause if it is available.

We should test it e.g. with union, as in the linked discussion. We could also add a test for table.select_columns ["nonexistent_name"] error_on_missing_columns=False where the No_Output_Columns would hold Missing_Input_Columns as its cause.

enso-bot[bot] commented 11 months ago

Radosław Waśko reports a new STANDUP for yesterday (2023-12-12):

Progress: Implemented improved error details for No_Such_Columns instances where possible, and added tests for these cases It should be finished by 2023-12-13.

Next Day: Next day I will be working on the #8045 task. Work on next task