-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-15112: [Integration][C++][Java] Implement Flight SQL integration tests #11989
ARROW-15112: [Integration][C++][Java] Implement Flight SQL integration tests #11989
Conversation
Hi @lidavidm ! We wrote the integration tests for Flight SQL as requested :) |
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.
Thanks for the quick turnaround, this looks good overall. I left some comments.
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
add_custom_target(arrow_flight_integration_tests) |
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 target necessary?
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 was already there on arrow/flight/CMakeLists.txt before moving to the new directory
...tests/src/main/java/org/apache/arrow/flight/integration/tests/FlightSqlScenarioProducer.java
Show resolved
Hide resolved
...tests/src/main/java/org/apache/arrow/flight/integration/tests/FlightSqlScenarioProducer.java
Outdated
Show resolved
Hide resolved
...tests/src/main/java/org/apache/arrow/flight/integration/tests/FlightSqlScenarioProducer.java
Outdated
Show resolved
Hide resolved
We need to exclude Go and Rust from the new test scenario. Also, the PR needs to be formatted (see https://arrow.apache.org/docs/developers/cpp/development.html#code-style-linting-and-ci, note that we use ClangTools 12 now not version 8) |
Done @lidavidm |
Hey @lidavidm , I don't know if these CI failures has something to do with these changes... Please let me know if there is anything else to do here |
There's some lint failures:
I think the other one is unrelated, but could you rebase on master to see if it goes away? |
94f98fe
to
5866b91
Compare
5866b91
to
78352e9
Compare
Ops @lidavidm ... Sorry, I don't know if I messed up when |
Ah, right, we have a branch…How about I rebase the branch, and then we can rebase the PRs? |
Hmm. I just rebased the branch…so do you mind trying to rebase again here? Sorry for the trouble. |
This refactor is a prerequisite to adding Flight SQL integration tests, as the current integration tests do not allow Flight SQL usage (because it would cause circular dependencies)
78352e9
to
97fe3ce
Compare
No problem! Just rebased :) |
Well, looks like the Docker registry isn't doing so well right now. I'll kick all the CI pipelines in a bit to try again. |
Hmm, I wonder if the test failure in Dev is just because it's getting confused since we're on a branch. I think we can resolve that when we make the final PR from flight-sql into master, then. |
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.
Thanks, just one more nit that caught my eye.
sqlClient.execute("SELECT STATEMENT", options), sqlClient); | ||
|
||
IntegrationAssertions.assertEquals(sqlClient.executeUpdate("UPDATE STATEMENT", options), | ||
10000L); |
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 nit, but can we move these numbers to constants so it's clear what they represent? (UPDATE_STATEMENT_EXPECTED_ROWS
or something)
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.
(The same goes for the producer, C++, etc.)
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.
Thanks! Done
Hey @lidavidm ! Are we good to merge this on Thank you |
We should be. I just kicked off CI. |
I think the failures are spurious. (I filed ARROW-15181 for the crash in the Flight tests.) |
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.
Thanks. Sorry, I just noticed a couple more small things - we can merge into the branch next.
Glad to see everything passing! Except to that "Dev/ Source Release and Merge Script", but it indeed seem to fail because we are in our own branch |
…n tests This adds Flight SQL scenarios for integration tests for C++ and Java implementations. The integrations tests assert that: - RPC objects built on clients are parsed correctly on servers - Arrow vectors built on servers have the expected Arrow schemas when received on clients Note: Had to separate integration tests in a new module within Java and C++ to avoid circular dependencies (Flight <-> Flight SQL) While working on this I found some inconsistencies between both implementation, this PR also fixes these problems. Closes #11989 from rafael-telles/flight-sql-integration-tests-2 Authored-by: Rafael Telles <rafael@telles.dev> Signed-off-by: David Li <li.davidm96@gmail.com>
Mega-PR is up at #12013 |
This adds Flight SQL scenarios for integration tests for C++ and Java implementations.
The integrations tests assert that:
Note: Had to separate integration tests in a new module within Java and C++ to avoid circular dependencies (Flight <-> Flight SQL)
While working on this I found some inconsistencies between both implementation, this PR also fixes these problems.