-
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
Implement In-Memory Table order_by #3515
Conversation
9f8c0e7
to
509f3b1
Compare
bb53225
to
972da1b
Compare
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 generally good to me, some code suggestions inline.
One issue I'd like to discuss before merge is the equals
/compareTo
inconsistency in MultiValueKey
, see below.
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering/Comparator.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering/Natural_Order.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Database/0.0.0-dev/src/Data/Dialect/Postgres.enso
Show resolved
Hide resolved
case Storage.Type.LONG -> NumericBuilder.createLongBuilder(size); | ||
case Storage.Type.STRING -> new StringBuilder(size); | ||
case Storage.Type.OBJECT -> new ObjectBuilder(size); | ||
default -> new InferredBuilder(size); |
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.
Is the default
ever reachable?
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.
in theory not as not an enumeration for Type wanted a safety fall back.
One to revisit when we handle column data types.
std-bits/table/src/main/java/org/enso/table/data/index/MultiValueKey.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/data/index/MultiValueKey.java
Outdated
Show resolved
Hide resolved
((default_comparator (Ord 1) (Ord 1)) == 0) . should_equal True | ||
|
||
Test.specify "should fail gracefully for incomparable items" <| | ||
(default_comparator 1 True).should_fail_with Vector.Incomparable_Values_Error |
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 we should move the Incomparable_Values_Error
away from Vector
as it is used in many other places now.
Some impact on Aggregate functions to look at.
Adjust test so deterministic answer.
Radek's PR comments.
3b67a27
to
96a7930
Compare
Pull Request Description
Implemented the
order_by
function with support for all modes of operation.Added support for case insensitive natural order.
Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide dist
and./run ide watch
.