Docs: Add PR review guide - #24051
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24051 +/- ##
==========================================
- Coverage 80.90% 80.89% -0.01%
==========================================
Files 1102 1102
Lines 376367 376346 -21
Branches 376367 376346 -21
==========================================
- Hits 304482 304454 -28
- Misses 53766 53770 +4
- Partials 18119 18122 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
365a836 to
6760aad
Compare
|
|
||
| 1. Is the feature or fix covered sufficiently with tests (see the [Testing](testing.md) section)? | ||
| 2. Is the code clear, and fits the style of the existing codebase? | ||
| See the [Reviewing Pull Requests](pr_review.md) guide for what we look for |
There was a problem hiding this comment.
I moved and expanded the content into its own page
| The PR description is often what users and contributors will find when they run | ||
| `git log` / `git blame` and ask "why is the code like this?". | ||
|
|
||
| Check that the description: |
There was a problem hiding this comment.
This document basically distills down my experience reviewing PRs / what I do. I think it is common practice but would love additioanl feedback / suggestions
There was a problem hiding this comment.
I will hope to expand this with some examples going forwrd
There was a problem hiding this comment.
Nit: my first PR I didn't realize the PR description folded into the commit message itself, since I realized I try to avoid tagging people there or other text that won't read well or makes sense in git log. An agent might produce a better description if provided with this info here
There was a problem hiding this comment.
I added this in a5752c4 -- is that enough?
6760aad to
7aec50c
Compare
| ## Compute the diff | ||
|
|
||
| ```bash | ||
| git fetch apache main |
There was a problem hiding this comment.
in my setup I have two remotes, origin and upstream if i try this approach it will fail. Others can have similar settings. Should we use something like <main-remote> or <upstream-main>.
There was a problem hiding this comment.
yes, thanks -- this is my personal setup which should not make it into the skill.
| ## Review the PR Description | ||
|
|
||
| The PR description is often what users and contributors will find when they run | ||
| `git log` / `git blame` and ask "why is the code like this?". |
There was a problem hiding this comment.
both git log and git blame don't show pr description unless you are using inside an IDE and using its built in git blame feature, from cli you can view the pr description using gh pr view
There was a problem hiding this comment.
if want to get readable results for the pr body then can use gh pr view --json body --jq .body
There was a problem hiding this comment.
The PR description usually becomes the extended commit message, I can usually see it with git log.
A (random) example from history as shown to me via git log in terminal:
commit 833e501459dcc418042b3280a0ea9cb2980005d8
Author: Burak Şen <buraksenb@gmail.com>
Date: Thu Jul 30 19:38:35 2026 +0300
fix(proto): prevent duplicate partition statistics on roundtrip (#23999)
## Which issue does this PR close?
- Closes #23998
## Rationale for this change
Decoding a `PartitionedFile` re-appended partition-column statistics
already present in protobuf.
## What changes are included in this PR?
Assign decoded statistics directly.
## Are these changes tested?
Yes new roundtrip test for this
## Are there any user-facing changes?
no
---------
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2010YOUY01
left a comment
There was a problem hiding this comment.
Thank you. I read through it and strongly agree!
|
|
||
| 1. Prefer `sqllogictest` (`.slt`) tests or DataFrame API tests where | ||
| possible, as they exercise **user visible behavior** and are less coupled | ||
| to internal implementation details than unit tests. |
There was a problem hiding this comment.
We could insert a list item here like:
2. Try to cover edge cases and failure scenarios as well, rather than testing only the common successful path.
asolimando
left a comment
There was a problem hiding this comment.
The PR review guide reads well, I personally learned a few things along the way already (I didn't know "ablation testing" practice had a name), left some minor/optional comments
| ## Review the PR Description | ||
|
|
||
| The PR description is often what users and contributors will find when they run | ||
| `git log` / `git blame` and ask "why is the code like this?". |
There was a problem hiding this comment.
The PR description usually becomes the extended commit message, I can usually see it with git log.
A (random) example from history as shown to me via git log in terminal:
commit 833e501459dcc418042b3280a0ea9cb2980005d8
Author: Burak Şen <buraksenb@gmail.com>
Date: Thu Jul 30 19:38:35 2026 +0300
fix(proto): prevent duplicate partition statistics on roundtrip (#23999)
## Which issue does this PR close?
- Closes #23998
## Rationale for this change
Decoding a `PartitionedFile` re-appended partition-column statistics
already present in protobuf.
## What changes are included in this PR?
Assign decoded statistics directly.
## Are these changes tested?
Yes new roundtrip test for this
## Are there any user-facing changes?
no
---------
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
| The PR description is often what users and contributors will find when they run | ||
| `git log` / `git blame` and ask "why is the code like this?". | ||
|
|
||
| Check that the description: |
There was a problem hiding this comment.
Nit: my first PR I didn't realize the PR description folded into the commit message itself, since I realized I try to avoid tagging people there or other text that won't read well or makes sense in git log. An agent might produce a better description if provided with this info here
|
|
||
| [`cargo llvm-cov`]: https://github.com/taiki-e/cargo-llvm-cov | ||
|
|
||
| ## Review the Code |
There was a problem hiding this comment.
Nit: I general tend to cluster related functions and tests close by in files. Being intentional on placement also helps reducing the chance of "both PRs inserted at the same place" type of conflicts
There was a problem hiding this comment.
It is a good idea -- how would we phrase this as something we could check in a code review? That tests should be close to the code that they are used?
Co-authored-by: Yongting You <2010youy01@gmail.com>
Co-authored-by: Yongting You <2010youy01@gmail.com>
…nto alamb/pr_review_guide
Which issue does this PR close?
Rationale for this change
As our project grows both in terms of number of users as well as the number of PRs submitted (due to agents and increasing usage) I would like to trying to document / automate as much as possible
As one of the largest bottlenecks at the moment is PR review, so making that more efficient I think will help us improve the flow of code in the project and make best use of our committers' time. My rationale is that by documenting this process more clearly
I also strongly believe effective documentation should be written for both humans and agents so I purposely didn't make a specific skill for this (instead I made a skill that points at the relevant parts of the docs)
What changes are included in this PR?
Are these changes tested?
By CI
Are there any user-facing changes?
New doc page