Skip to content

Commit 365df8e

Browse files
authored
feat: Add CI check to ensure generated docs are in sync with code (#2779)
1 parent af21ae9 commit 365df8e

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

.github/actions/java-test/action.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,32 @@ runs:
6262
- name: Run Maven compile
6363
shell: bash
6464
run: |
65-
./mvnw -B compile test-compile scalafix:scalafix -Dscalafix.mode=CHECK -Psemanticdb ${{ inputs.maven_opts }}
65+
./mvnw -B package -DskipTests scalafix:scalafix -Dscalafix.mode=CHECK -Psemanticdb ${{ inputs.maven_opts }}
66+
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v6
69+
with:
70+
node-version: '24'
71+
72+
- name: Install prettier
73+
shell: bash
74+
run: |
75+
npm install -g prettier
76+
77+
- name: Run prettier
78+
shell: bash
79+
run: |
80+
npx prettier "**/*.md" --write
81+
82+
- name: Mark workspace as safe for git
83+
shell: bash
84+
run: |
85+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
86+
87+
- name: Check for any local git changes (such as generated docs)
88+
shell: bash
89+
run: |
90+
./dev/ci/check-working-tree-clean.sh
6691
6792
- name: Run all tests
6893
shell: bash

dev/ci/check-working-tree-clean.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
set -euo pipefail # Exit on errors, undefined vars, pipe failures
22+
23+
# Check if we're in a git repository
24+
if ! git rev-parse --git-dir > /dev/null 2>&1; then
25+
echo "Error: Not in a git repository"
26+
# exit 1
27+
fi
28+
29+
# Fail if there are any local changes (staged, unstaged, or untracked)
30+
if [ -n "$(git status --porcelain)" ]; then
31+
echo "Working tree is not clean:"
32+
git status --short
33+
echo "Full diff:"
34+
git diff
35+
echo ""
36+
echo "Please commit, stash, or clean these changes before proceeding."
37+
exit 1
38+
else
39+
echo "Working tree is clean"
40+
fi
41+

docs/source/user-guide/latest/configs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Comet provides the following configuration settings.
6767
| `spark.comet.exceptionOnDatetimeRebase` | Whether to throw exception when seeing dates/timestamps from the legacy hybrid (Julian + Gregorian) calendar. Since Spark 3, dates/timestamps were written according to the Proleptic Gregorian calendar. When this is true, Comet will throw exceptions when seeing these dates/timestamps that were written by Spark version before 3.0. If this is false, these dates/timestamps will be read as if they were written to the Proleptic Gregorian calendar and will not be rebased. | false |
6868
| `spark.comet.exec.enabled` | Whether to enable Comet native vectorized execution for Spark. This controls whether Spark should convert operators into their Comet counterparts and execute them in native space. Note: each operator is associated with a separate config in the format of `spark.comet.exec.<operator_name>.enabled` at the moment, and both the config and this need to be turned on, in order for the operator to be executed in native. | true |
6969
| `spark.comet.exec.replaceSortMergeJoin` | Experimental feature to force Spark to replace SortMergeJoin with ShuffledHashJoin for improved performance. This feature is not stable yet. For more information, refer to the [Comet Tuning Guide](https://datafusion.apache.org/comet/user-guide/tuning.html). | false |
70-
| `spark.comet.exec.strictFloatingPoint` | When enabled, fall back to Spark for floating-point operations that differ from Spark, such as when comparing or sorting -0.0 and 0.0. For more information, refer to the [Comet Compatibility Guide](https://datafusion.apache.org/comet/user-guide/compatibility.html). | false |
70+
| `spark.comet.exec.strictFloatingPoint` | When enabled, fall back to Spark for floating-point operations that may differ from Spark, such as when comparing or sorting -0.0 and 0.0. For more information, refer to the [Comet Compatibility Guide](https://datafusion.apache.org/comet/user-guide/compatibility.html). | false |
7171
| `spark.comet.expression.allowIncompatible` | Comet is not currently fully compatible with Spark for all expressions. Set this config to true to allow them anyway. For more information, refer to the [Comet Compatibility Guide](https://datafusion.apache.org/comet/user-guide/compatibility.html). | false |
7272
| `spark.comet.maxTempDirectorySize` | The maximum amount of data (in bytes) stored inside the temporary directories. | 107374182400b |
7373
| `spark.comet.metrics.updateInterval` | The interval in milliseconds to update metrics. If interval is negative, metrics will be updated upon task completion. | 3000 |
@@ -225,6 +225,7 @@ These settings can be used to determine which parts of the plan are accelerated
225225
| `spark.comet.expression.ConcatWs.enabled` | Enable Comet acceleration for `ConcatWs` | true |
226226
| `spark.comet.expression.Contains.enabled` | Enable Comet acceleration for `Contains` | true |
227227
| `spark.comet.expression.Cos.enabled` | Enable Comet acceleration for `Cos` | true |
228+
| `spark.comet.expression.Cot.enabled` | Enable Comet acceleration for `Cot` | true |
228229
| `spark.comet.expression.CreateArray.enabled` | Enable Comet acceleration for `CreateArray` | true |
229230
| `spark.comet.expression.CreateNamedStruct.enabled` | Enable Comet acceleration for `CreateNamedStruct` | true |
230231
| `spark.comet.expression.DateAdd.enabled` | Enable Comet acceleration for `DateAdd` | true |

0 commit comments

Comments
 (0)