-
Notifications
You must be signed in to change notification settings - Fork 326
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
Initial implementation of Data.read_many
#11490
Conversation
distribution/lib/Standard/Base/0.0.0-dev/src/System/File_Format.enso
Outdated
Show resolved
Hide resolved
# Conflicts: # distribution/lib/Standard/Table/0.0.0-dev/src/Table.enso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks a great start to build on.
distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Database/0.0.0-dev/src/DB_Column.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Read/Return_As.enso
Outdated
Show resolved
Hide resolved
If `Auto_Detect` is specified; each file determines the specific | ||
type and configures it appropriately. If there is no matching type then | ||
a `File_Error.Unsupported_Type` error is returned. | ||
- return: Specifies the shape of the data to return. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I understand what a user would do with this option. Should it be on the graphical interface API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I get what this is now. Guess we will improve the comment as we add more options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to accept suggestions on what the doc could be. Perhaps I should add examples?
I hope in GUI it will be easy because we'll have a dropdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of small changes
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Read/Many_Files_List.enso
Show resolved
Hide resolved
to_display_text self -> Text = self.underlying.to_display_text | ||
|
||
## PRIVATE | ||
make_return self (input : Many_Files_List) (objects : Vector Any) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this method private
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used from within Standard.Table
.
Single_Choice display=Display.Always values=options | ||
|
||
## PRIVATE | ||
type Return_As_Base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this type in its own private
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because its constructors are actually supposed to be visible, only the type is hidden. Perhaps it can be moved to a separate module.
distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso
Show resolved
Hide resolved
package org.enso.base.read; | ||
|
||
@org.openide.util.lookup.ServiceProvider(service = ReadManyReturnSPI.class) | ||
public class BaseReadManyReturnSPI extends ReadManyReturnSPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeating the terminology misuse - the BaeReadManyReturn
class isn't interface, this class is implementation. I suggest to rename to BaseReadManyReturnImpl
.
Make final
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of our SPI implementations are named according to this convention.
If the convention is wrong, we should rename them all at once, which should be done separately from this PR.
import org.enso.base.polyglot.EnsoMeta; | ||
import org.graalvm.polyglot.Value; | ||
|
||
public abstract class ReadManyReturnSPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation.
Pull Request Description
Data.read_many
#11311Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.