Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/actions/java-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,27 @@ runs:
- name: Run tests
shell: bash
run: |
SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}

MAVEN_OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
- name: Upload crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: crash-logs-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
path: "**/hs_err_pid*.log"
- name: Debug listing
if: failure()
shell: bash
run: |
echo "CWD: $(pwd)"
ls -lah .
ls -lah target
find . -name 'unit-tests.log'
- name: Upload unit-tests.log
if: failure()
uses: actions/upload-artifact@v4
with:
name: unit-tests-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
path: "**/target/unit-tests.log"
- name: Upload test results
if: ${{ inputs.upload-test-reports == 'true' }}
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,22 +410,21 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp
}
}

ignore("array_repeat") {
test("array_repeat") {
withSQLConf(
CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true",
CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.key -> "true") {
Seq(true, false).foreach { dictionaryEnabled =>
withTempDir { dir =>
val path = new Path(dir.toURI.toString, "test.parquet")
makeParquetFileAllTypes(path, dictionaryEnabled, 10000)
makeParquetFileAllTypes(path, dictionaryEnabled, 100)
spark.read.parquet(path.toString).createOrReplaceTempView("t1")

checkSparkAnswerAndOperator(sql("SELECT array_repeat(_4, null) from t1"))
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_4, 0) from t1"))
checkSparkAnswerAndOperator(
sql("SELECT array_repeat(_2, 5) from t1 where _2 is not null"))
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_2, 5) from t1 where _2 is null"))
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_3, _4) from t1 where _3 is null"))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the average value of _4 is 5,000 so for 10k rows we are repeating values a total of 50m times

checkSparkAnswerAndOperator(
sql("SELECT array_repeat(_3, _4) from t1 where _3 is not null"))
checkSparkAnswerAndOperator(sql("SELECT array_repeat(cast(_3 as string), 2) from t1"))
Expand Down
Loading
Loading