-
Notifications
You must be signed in to change notification settings - Fork 323
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
Create database table from memory #6429
Create database table from memory #6429
Conversation
880cfdc
to
a2ef0a7
Compare
type Non_Unique_Primary_Key | ||
## PRIVATE | ||
Indicates that the columns selected for the primary key do not uniquely | ||
identify rows in the table. | ||
|
||
Arguments: | ||
- primary_key: The primary key that is not unique. | ||
# TODO [RW] should we include `duplicate_rows` here to show example ids of rows that are not unique? | ||
Error (primary_key : Vector Text) |
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.
cc @jdunkerley I wanted to figure out if we want to have these duplicate_rows
.
It could make the user's life easier to show them indices of rows of one of the duplicated groups.
OTOH, the user can always compute these themselves and computing them is pretty costly for big tables.
Third thing is, when trying to compute them I realised it's actually not that easy. I'm thinking if we should add some methods that could help. I'm thinking of Aggregate_Column.As_Vector
which could create a vector of all elements of a single group. Or something else that could help - as currently finding out duplicated rows is not that easy - unless I'm not seeing some cool trick.
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 think this would be very useful; I would think you could do it with a Vector.group_by on the rows, returning a Vector of Vectors, and show the inner vectors with > 1 row. Assign this to me if you like.
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 reported this as #6437 and we can handle it when we have a bit of spare time.
returning a Vector of Vectors
I guess that may require extending Aggregate_Column
, but yeah that sounds like a good idea.
type Non_Unique_Primary_Key | ||
## PRIVATE | ||
Indicates that the columns selected for the primary key do not uniquely | ||
identify rows in the table. | ||
|
||
Arguments: | ||
- primary_key: The primary key that is not unique. | ||
# TODO [RW] should we include `duplicate_rows` here to show example ids of rows that are not unique? | ||
Error (primary_key : Vector Text) |
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 think this would be very useful; I would think you could do it with a Vector.group_by on the rows, returning a Vector of Vectors, and show the inner vectors with > 1 row. Assign this to me if you like.
distribution/lib/Standard/Database/0.0.0-dev/src/Internal/JDBC_Connection.enso
Show resolved
Hide resolved
...urces/enso-test-java-helpers/src/main/java/org/enso/table_test_helpers/ExplodingStorage.java
Show resolved
Hide resolved
df2e655
to
79b9af6
Compare
9c6c854
to
4627742
Compare
distribution/lib/Standard/Database/0.0.0-dev/src/Extensions/Upload_Table.enso
Outdated
Show resolved
Hide resolved
d73bdd8
to
4ea5fe9
Compare
4ea5fe9
to
2d398aa
Compare
Pull Request Description
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.