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

Merge Column_Indexes_Out_Of_Range into Missing_Input_Columns. #6901

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

radeusgd
Copy link
Member

Pull Request Description

Implements #6869

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label May 30, 2023
@radeusgd radeusgd self-assigned this May 30, 2023
Comment on lines -168 to -172
- If a column index is out of range, a `Column_Indexes_Out_Of_Range` is
raised as an error, unless `error_on_missing_columns` is set to
`False`, in which case the problem is reported according to the
`on_problems` setting.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly removing these without replacement, because IMO the upper comment is good enough for both index and name based scenarios:

- If a column in `columns` is not in the input table, a
  `Missing_Input_Columns` is raised

If a "column" is not in the input table IMO works both when the column is represented by name, selector or the integer index.

@@ -1281,7 +1260,7 @@ type Table
not possible to create a table without any columns.
- If a given aggregate is not supported by the backend,
`Unsupported_Database_Operation` is reported.
- If a column index is out of range, a `Column_Indexes_Out_Of_Range` is
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, an exception - the Text case has some specific explanation and behaves slightly differently here. So I keep the special case for 'index' because it differs from Text here. I just update the comment to tell the current state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this is due to handling differences caused by trying to parse the text as expression)

@radeusgd radeusgd linked an issue May 30, 2023 that may be closed by this pull request
4 tasks
@radeusgd radeusgd force-pushed the wip/radeusgd/6860-add-row-number branch 2 times, most recently from e52a4b3 to e7a94c4 Compare May 31, 2023 12:47
@radeusgd radeusgd force-pushed the wip/radeusgd/6869-simplify-missing-column-error branch from 672f36f to 4f60c8c Compare May 31, 2023 12:47
Copy link
Member

@jdunkerley jdunkerley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - a nice simplification.

@radeusgd radeusgd force-pushed the wip/radeusgd/6860-add-row-number branch from e7a94c4 to 9a5bc94 Compare June 1, 2023 17:53
@radeusgd radeusgd force-pushed the wip/radeusgd/6869-simplify-missing-column-error branch from 4f60c8c to a24cdf0 Compare June 1, 2023 17:54
@radeusgd radeusgd force-pushed the wip/radeusgd/6860-add-row-number branch from 9a5bc94 to 7558c56 Compare June 2, 2023 09:22
@radeusgd radeusgd force-pushed the wip/radeusgd/6869-simplify-missing-column-error branch from a24cdf0 to af92a73 Compare June 2, 2023 09:44
Base automatically changed from wip/radeusgd/6860-add-row-number to develop June 2, 2023 10:13
@radeusgd radeusgd force-pushed the wip/radeusgd/6869-simplify-missing-column-error branch from af92a73 to fcae969 Compare June 2, 2023 11:18
@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label Jun 2, 2023
@mergify mergify bot merged commit cfb2f29 into develop Jun 2, 2023
@mergify mergify bot deleted the wip/radeusgd/6869-simplify-missing-column-error branch June 2, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge Column_Indexes_Out_Of_Range into Missing_Input_Columns
3 participants