Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Apr 17, 2023

Rationale for this change

No ordering is unnecessarily limiting. Systems can and do implement distributed sorts, but they can’t reflect this in Flight RPC.

What changes are included in this PR?

These changes add FlightInfo.ordered.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

This PR includes breaking changes to public APIs.

@github-actions
Copy link

@github-actions
Copy link

⚠️ GitHub issue #34852 has been automatically assigned in GitHub to PR creator.

@kou
Copy link
Member Author

kou commented Apr 19, 2023

An integration test is added.
We can review this but we can NOT merge this yet. We need one more implementation and a formal vote before we merge this.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few minor comments.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe to be clear, leave in an "Otherwise, there is no ordering defined on endpoints or the data within"?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK!

Comment on lines +273 to +283
Copy link
Member

Choose a reason for hiding this comment

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

Compared to the wording in Flight.rst, it is not as clear what this is trying to say

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've copied some missing descriptions from Flight.rst.

Copy link
Member

Choose a reason for hiding this comment

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

I can put together Java support too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow! Thanks!
Could you push it to this branch when you work on it? Or you can create another branch for it.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!
Merged.

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we be asserting that this is true here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it may be a more straightforward approach.
I'll use the approach.

Copy link
Member

Choose a reason for hiding this comment

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

SQLite doesn't tell us whether the result set is sorted or not, so I suppose technically this should always be 'true'? (That said, this server also only ever returns one endpoint so it's moot either way.)

Copy link
Member Author

Choose a reason for hiding this comment

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

We can use true here because this flight server always returns one endpoint.
But I think that false is better here because false means "unknown order".

A real Flight SQL server will set true here only when it analyzes the given query and detects ORDER BY in a main SELECT.
How about adding a comment something like "TODO: Set ordered to true only when the query has ORDER BY" here?

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Apr 19, 2023
Copy link
Member

Choose a reason for hiding this comment

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

I am not familiar with flight so maybe a dumb question: does the user know which order it is? Like ascending/descending and what are the sorted columns?

Copy link
Member

Choose a reason for hiding this comment

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

Good question, but no, this is just a semantic flag to indicate that (unlike the current status) there is some ordering on the dataset. It's still up to the application to define what that means.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Apr 20, 2023
@kou kou force-pushed the cpp-flight-ordered branch from 231a17d to ead7260 Compare April 20, 2023 05:34
@github-actions github-actions bot added awaiting change review Awaiting change review awaiting changes Awaiting changes and removed awaiting changes Awaiting changes awaiting change review Awaiting change review labels Apr 20, 2023
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Apr 26, 2023
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Apr 29, 2023
@kou
Copy link
Member Author

kou commented Apr 29, 2023

@github-actions crossbow submit preview-docs

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Apr 29, 2023
@github-actions
Copy link

Revision: 4c2b78c

Submitted crossbow builds: ursacomputing/crossbow @ actions-0d6f29303c

Task Status
preview-docs Github Actions

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels May 2, 2023
Comment on lines -120 to +134
consumption; this is up to the application to implement.
consumption; this is up to the application to implement. The client
can also use ``FlightInfo.ordered``. See the previous item for
details of ``FlightInfo.ordered``.
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 forgot to update this sentence...
If anyone has a suggestion for wording, please share it.

@kou
Copy link
Member Author

kou commented May 2, 2023

@github-actions crossbow submit preview-docs

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels May 2, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

Revision: 2cc8304

Submitted crossbow builds: ursacomputing/crossbow @ actions-4c9d228232

Task Status
preview-docs Github Actions

@kou
Copy link
Member Author

kou commented May 9, 2023

@kou kou merged commit b73ddc3 into apache:main May 9, 2023
@kou kou deleted the cpp-flight-ordered branch May 9, 2023 01:03
@alamb
Copy link
Contributor

alamb commented May 9, 2023

Thank you @kou

@ursabot
Copy link

ursabot commented May 9, 2023

Benchmark runs are scheduled for baseline = aa8ffbe and contender = b73ddc3. b73ddc3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️2.82% ⬆️0.23%] test-mac-arm
[Finished ⬇️0.26% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️4.25% ⬆️3.76%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] b73ddc33 ec2-t3-xlarge-us-east-2
[Finished] b73ddc33 test-mac-arm
[Finished] b73ddc33 ursa-i9-9960x
[Finished] b73ddc33 ursa-thinkcentre-m75q
[Finished] aa8ffbe1 ec2-t3-xlarge-us-east-2
[Finished] aa8ffbe1 test-mac-arm
[Finished] aa8ffbe1 ursa-i9-9960x
[Finished] aa8ffbe1 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented May 9, 2023

['Python', 'R'] benchmarks have high level of regressions.
test-mac-arm

liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this pull request May 11, 2023
…ta (apache#35178)

### Rationale for this change

No ordering is unnecessarily limiting.  Systems can and do implement distributed sorts, but they can’t reflect this in Flight RPC.

### What changes are included in this PR?

These changes add `FlightInfo.ordered`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

**This PR includes breaking changes to public APIs.**

* Closes: apache#34852
* Closes: apache#35085

Lead-authored-by: Sutou Kouhei <kou@clear-code.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this pull request May 15, 2023
…ta (apache#35178)

### Rationale for this change

No ordering is unnecessarily limiting.  Systems can and do implement distributed sorts, but they can’t reflect this in Flight RPC.

### What changes are included in this PR?

These changes add `FlightInfo.ordered`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

**This PR includes breaking changes to public APIs.**

* Closes: apache#34852
* Closes: apache#35085

Lead-authored-by: Sutou Kouhei <kou@clear-code.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…ta (apache#35178)

### Rationale for this change

No ordering is unnecessarily limiting.  Systems can and do implement distributed sorts, but they can’t reflect this in Flight RPC.

### What changes are included in this PR?

These changes add `FlightInfo.ordered`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

**This PR includes breaking changes to public APIs.**

* Closes: apache#34852
* Closes: apache#35085

Lead-authored-by: Sutou Kouhei <kou@clear-code.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go][FlightRPC] Add support for ordered data [C++][Java][FlightRPC] Add support for ordered data

6 participants