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

Data analysts should be able to transform a Table using the select_columns function #3230

Merged
merged 28 commits into from
Feb 2, 2022

Conversation

radeusgd
Copy link
Member

@radeusgd radeusgd commented Jan 19, 2022

Pull Request Description

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the Scala, Java, and Rust style guides.
  • All documentation and configuration conforms to the markdown and YAML style guides.
  • All code has been tested where possible.

@radeusgd radeusgd self-assigned this Jan 19, 2022
Base automatically changed from wip/radeusgd/column-match-180855277 to develop January 20, 2022 10:11
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch 2 times, most recently from d1e12a6 to 87c1f00 Compare January 21, 2022 17:23
@radeusgd radeusgd changed the base branch from develop to wip/radeusgd/improve-vector January 21, 2022 17:24
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch from 87c1f00 to 903266b Compare January 22, 2022 15:23
@radeusgd radeusgd force-pushed the wip/radeusgd/improve-vector branch from 2a74cf6 to 387a227 Compare January 22, 2022 15:24
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch from 903266b to bee5458 Compare January 22, 2022 15:24
@radeusgd radeusgd force-pushed the wip/radeusgd/improve-vector branch 2 times, most recently from 6a5ab36 to 70ff6d6 Compare January 25, 2022 15:41
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch from bee5458 to 13001e1 Compare January 25, 2022 17:10
Base automatically changed from wip/radeusgd/improve-vector to develop January 25, 2022 17:29
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch from 853803b to f9b22f8 Compare January 25, 2022 17:37
@radeusgd radeusgd force-pushed the wip/radeusgd/select-columns-180794249 branch from f9b22f8 to 7c1c05c Compare January 27, 2022 11:07

from Standard.Database.Data.Column as Column_Module import all
from Standard.Database.Data.Internal.IR import Internal_Column
from Standard.Table.Data.Order_Rule as Order_Rule_Module import Order_Rule
from Standard.Table.Data.Table import No_Such_Column_Error
from Standard.Table.Data.Order_Rule as Order_Rule_Module import Order_Rule
Copy link
Member

Choose a reason for hiding this comment

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

duplicate import - should this be raised as an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

As in a compiler warning? I'm not sure. May be worth asking someone from the engine team I guess.

Copy link
Member

Choose a reason for hiding this comment

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

Answering the question – yes, it should raise a warning. If it's not, please add such ticket for the Engine team.

@@ -0,0 +1,29 @@
from Standard.Base import all

from Standard.Table.Data.Matching import all
Copy link
Member

Choose a reason for hiding this comment

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

Technically only need to import Matching_Strategy - as a type definition probably worth being tight.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, we are also using Exact imported from there. Then I'd need to change it to Matching.Exact.

What we import is not exported by default (need an explicit export statement), so I don't think it matters really. But can change if you think that's better.

Copy link
Member

Choose a reason for hiding this comment

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

We should use "all" imports for prelude like stuff only. This was described in the Language document by my and Ara some time ago. The "all" import should be rare as it pollutes the scope a lot.


from Standard.Database.Data.Column as Column_Module import all
from Standard.Database.Data.Internal.IR import Internal_Column
from Standard.Table.Data.Order_Rule as Order_Rule_Module import Order_Rule
from Standard.Table.Data.Table import No_Such_Column_Error
from Standard.Table.Data.Order_Rule as Order_Rule_Module import Order_Rule
from Standard.Table.Data.Column_Selector as Column_Selector_Module import all
from Standard.Base.Error.Problem_Behavior as Problem_Behavior_Module import all
Copy link
Member

Choose a reason for hiding this comment

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

import Problem_Behavior

Copy link
Member

Choose a reason for hiding this comment

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

Similar thing with "all" imports – we should not pollute the scope this way. The rule in Enso is to import only needed things, not all.

Copy link
Member

Choose a reason for hiding this comment

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

This should be drastically improved after we implement the auto-scoping mechanism in the Engine. Btw, you've been talking with Engine about that already, right?

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.

A few minor corrections.
A little bit of clarity needed on the Problem_Behavior stuff.

The main function looks good but wonder if shuffled could be clearer to read.

@radeusgd radeusgd requested a review from jdunkerley January 31, 2022 14:19
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

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

Cool implementation @radeusgd . @jdunkerley thanks for an amazing review!

@jdunkerley jdunkerley merged commit b5fc87e into develop Feb 2, 2022
@jdunkerley jdunkerley deleted the wip/radeusgd/select-columns-180794249 branch February 2, 2022 09:04
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.

4 participants