-
Notifications
You must be signed in to change notification settings - Fork 166
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
docs: Move existing documentation into new Contributor Guide and add Getting Started section #334
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!--- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
# Contributing to Apache DataFusion Comet | ||
|
||
We welcome contributions to Comet in many areas, and encourage new contributors to get involved. | ||
|
||
Here are some areas where you can help: | ||
|
||
- Testing Comet with existing Spark jobs and reporting issues for any bugs or performance issues | ||
- Contributing code to support Spark expressions, operators, and data types that are not currently supported | ||
- Reviewing pull requests and helping to test new features for correctness and performance | ||
- Improving documentation | ||
|
||
## Finding issues to work on | ||
|
||
We maintain a list of good first issues in GitHub [here](https://github.com/apache/datafusion-comet/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). | ||
|
||
## Reporting issues | ||
|
||
We use [GitHub issues](https://github.com/apache/datafusion-comet/issues) for bug reports and feature requests. | ||
|
||
## Asking for Help | ||
|
||
The Comet project uses the same Slack and Discord channels as the main Apache DataFusion project. See details at | ||
[Apache DataFusion Communications]. There are dedicated Comet channels in both Slack and Discord. | ||
|
||
## Regular public meetings | ||
|
||
The Comet contributors hold regular video calls where new and current contributors are welcome to ask questions and | ||
coordinate on issues that they are working on. | ||
|
||
See the [Apache DataFusion Comet community meeting] Google document for more information. | ||
|
||
[Apache DataFusion Communications]: https://datafusion.apache.org/contributor-guide/communication.html | ||
[Apache DataFusion Comet community meeting]: https://docs.google.com/document/d/1NBpkIAuU7O9h8Br5CbFksDhX-L9TyO9wmGLPMe0Plc8/edit?usp=sharing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,13 @@ under the License. | |
# Comet Debugging Guide | ||
|
||
This HOWTO describes how to debug JVM code and Native code concurrently. The guide assumes you have: | ||
|
||
1. Intellij as the Java IDE | ||
2. CLion as the Native IDE. For Rust code, the CLion Rust language plugin is required. Note that the | ||
Intellij Rust plugin is not sufficient. | ||
Intellij Rust plugin is not sufficient. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formatting changes are from running |
||
3. CLion/LLDB as the native debugger. CLion ships with a bundled LLDB and the Rust community has | ||
its own packaging of LLDB (`lldb-rust`). Both provide a better display of Rust symbols than plain | ||
LLDB or the LLDB that is bundled with XCode. We will use the LLDB packaged with CLion for this guide. | ||
its own packaging of LLDB (`lldb-rust`). Both provide a better display of Rust symbols than plain | ||
LLDB or the LLDB that is bundled with XCode. We will use the LLDB packaged with CLion for this guide. | ||
4. We will use a Comet _unit_ test as the canonical use case. | ||
|
||
_Caveat: The steps here have only been tested with JDK 11_ on Mac (M1) | ||
|
@@ -42,21 +43,24 @@ use advanced `lldb` debugging. | |
1. Add a Debug Configuration for the unit test | ||
|
||
1. In the Debug Configuration for that unit test add `-Xint` as a JVM parameter. This option is | ||
undocumented *magic*. Without this, the LLDB debugger hits a EXC_BAD_ACCESS (or EXC_BAD_INSTRUCTION) from | ||
which one cannot recover. | ||
undocumented _magic_. Without this, the LLDB debugger hits a EXC_BAD_ACCESS (or EXC_BAD_INSTRUCTION) from | ||
which one cannot recover. | ||
|
||
1. Add a println to the unit test to print the PID of the JVM process. (jps can also be used but this is less error prone if you have multiple jvm processes running) | ||
|
||
```JDK8 | ||
println("Waiting for Debugger: PID - ", ManagementFactory.getRuntimeMXBean().getName()) | ||
``` | ||
|
||
This will print something like : `PID@your_machine_name`. | ||
|
||
1. Add a println to the unit test to print the PID of the JVM process. (jps can also be used but this is less error prone if you have multiple jvm processes running) | ||
``` JDK8 | ||
println("Waiting for Debugger: PID - ", ManagementFactory.getRuntimeMXBean().getName()) | ||
``` | ||
This will print something like : `PID@your_machine_name`. | ||
For JDK9 and newer | ||
|
||
For JDK9 and newer | ||
```JDK9 | ||
println("Waiting for Debugger: PID - ", ProcessHandle.current.pid) | ||
``` | ||
```JDK9 | ||
println("Waiting for Debugger: PID - ", ProcessHandle.current.pid) | ||
``` | ||
|
||
==> Note the PID | ||
==> Note the PID | ||
|
||
1. Debug-run the test in Intellij and wait for the breakpoint to be hit | ||
|
||
|
@@ -96,7 +100,8 @@ Detecting the debugger | |
https://stackoverflow.com/questions/5393403/can-a-java-application-detect-that-a-debugger-is-attached#:~:text=No.,to%20let%20your%20app%20continue.&text=I%20know%20that%20those%20are,meant%20with%20my%20first%20phrase). | ||
|
||
# Verbose debug | ||
By default, Comet outputs the exception details specific for Comet. | ||
|
||
By default, Comet outputs the exception details specific for Comet. | ||
|
||
```scala | ||
scala> spark.sql("my_failing_query").show(false) | ||
|
@@ -112,7 +117,7 @@ This was likely caused by a bug in DataFusion's code and we would welcome that y | |
``` | ||
|
||
There is a verbose exception option by leveraging DataFusion [backtraces](https://arrow.apache.org/datafusion/user-guide/example-usage.html#enable-backtraces) | ||
This option allows to append native DataFusion stacktrace to the original error message. | ||
This option allows to append native DataFusion stacktrace to the original error message. | ||
To enable this option with Comet it is needed to include `backtrace` feature in [Cargo.toml](https://github.com/apache/arrow-datafusion-comet/blob/main/core/Cargo.toml) for DataFusion dependencies | ||
|
||
``` | ||
|
@@ -129,15 +134,16 @@ RUST_BACKTRACE=1 $SPARK_HOME/spark-shell --jars spark/target/comet-spark-spark3. | |
``` | ||
|
||
Get the expanded exception details | ||
|
||
```scala | ||
scala> spark.sql("my_failing_query").show(false) | ||
24/03/05 17:00:49 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0) | ||
org.apache.comet.CometNativeException: Internal error: MIN/MAX is not expected to receive scalars of incompatible types (Date32("NULL"), Int32(15901)) | ||
|
||
backtrace: | ||
backtrace: | ||
0: std::backtrace::Backtrace::create | ||
1: datafusion_physical_expr::aggregate::min_max::min | ||
2: <datafusion_physical_expr::aggregate::min_max::MinAccumulator as datafusion_expr::accumulator::Accumulator>::update_batch | ||
2: <datafusion_physical_expr::aggregate::min_max::MinAccumulator as datafusion_expr::accumulator::Accumulator>::update_batch | ||
3: <futures_util::stream::stream::fuse::Fuse<S> as futures_core::stream::Stream>::poll_next | ||
4: comet::execution::jni_api::Java_org_apache_comet_Native_executePlan::{{closure}} | ||
5: _Java_org_apache_comet_Native_executePlan | ||
|
@@ -151,6 +157,8 @@ at org.apache.comet.CometExecIterator.hasNext(CometExecIterator.scala:126) | |
(reduced) | ||
|
||
``` | ||
|
||
Note: | ||
|
||
- The backtrace coverage in DataFusion is still improving. So there is a chance the error still not covered, if so feel free to file a [ticket](https://github.com/apache/arrow-datafusion/issues) | ||
- The backtrace evaluation comes with performance cost and intended mostly for debugging purposes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 feel that we can move to RustRover instead of CLion. It is specified for Rust development. We can update this later.