You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "manuzhang (via GitHub)" <gi...@apache.org> on 2025/11/04 17:02:40 UTC

[PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

manuzhang opened a new pull request, #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #2685.
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## How are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2492477164


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar"
+COMET_FUZZ_JAR="target/$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  cd ..

Review Comment:
   Should we also be building native code here ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2509122654


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"

Review Comment:
   use `mvn -f ...` here too for stability.



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_FUZZ_JAR="${DIR}/target/${COMET_FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  make -f "${PARENT_DIR}/Makefile"
+else
+  echo "Building Fuzz testing jar..."
+  mvn package -DskipTests

Review Comment:
   Also IMO it would be good to always build the Fuzz testing jar. Since the user runs this script (s)he wants the latest version of the fuzz jar. Just let Maven decide whether it needs to re-compile it.



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"

Review Comment:
   ```suggestion
   COMET_FUZZ_ARTIFACT_ID="$(mvn -f \"${DIR}/pom.xml\" -q help:evaluate -Dexpression=project.artifactId -DforceStdout)" || {
     echo "Error: Failed to retrieve the Fuzz project artifactId from Maven" >&2
     exit 1
   }
   ```



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"

Review Comment:
   Also use `${PARENT_DIR}/mvnw` instead of `mvn` to not require globally installed Maven.



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"

Review Comment:
   ```suggestion
   PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)" || {
     echo "Error: Failed to retrieve the project version from Maven" >&2
     exit 1
   }
   ```



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_FUZZ_JAR="${DIR}/target/${COMET_FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  make -f "${PARENT_DIR}/Makefile"
+else
+  echo "Building Fuzz testing jar..."
+  mvn package -DskipTests

Review Comment:
   This may fail to find the pom.xml if the script is executed from a directory different than $DIR. Better use `mvn -f ...` here too



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_FUZZ_JAR="${DIR}/target/${COMET_FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  make -f "${PARENT_DIR}/Makefile"

Review Comment:
   ```suggestion
     pushd "${PARENT_DIR}"
     make
     popd
   ```
   I think you need to change the current working directory for `make`



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"

Review Comment:
   ```suggestion
   COMET_SPARK_ARTIFACT_ID="$(mvn -f \"${PARENT_DIR}/spark/pom.xml\" -q help:evaluate -Dexpression=project.artifactId -DforceStdout)" || {
     echo "Error: Failed to retrieve the Spark project artifactId from Maven" >&2
     exit 1
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#issuecomment-3522814239

   FYI @andygrove who is also doing work in parallel in documenting the fuzz routine


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2494987139


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar"
+COMET_FUZZ_JAR="target/$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  cd ..
+  mvn install -DskipTests
+  cd fuzz-testing

Review Comment:
   This can be done once https://github.com/apache/datafusion-comet/pull/2691 is in.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#issuecomment-3487210859

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/2686?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 22.51%. Comparing base ([`f09f8af`](https://app.codecov.io/gh/apache/datafusion-comet/commit/f09f8af64c6599255e116a376f4f008f2fd63b43?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4066df0`](https://app.codecov.io/gh/apache/datafusion-comet/commit/4066df0dc764e7cc5060f30d3b2da81869768414?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 658 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main    #2686       +/-   ##
   =============================================
   - Coverage     56.12%   22.51%   -33.61%     
   + Complexity      976      436      -540     
   =============================================
     Files           119      147       +28     
     Lines         11743    13718     +1975     
     Branches       2251     2356      +105     
   =============================================
   - Hits           6591     3089     -3502     
   - Misses         4012    10067     +6055     
   + Partials       1140      562      -578     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/2686?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2509221118


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"

Review Comment:
   ```suggestion
   COMET_FUZZ_ARTIFACT_ID="$(mvn -f \"${DIR}/pom.xml\" -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2509736098


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_SPARK_JAR="${PARENT_DIR}/spark/target/${COMET_SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
+COMET_FUZZ_ARTIFACT_ID="$(mvn -f ${DIR}/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
+COMET_FUZZ_JAR="${DIR}/target/${COMET_FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  make -f "${PARENT_DIR}/Makefile"
+else
+  echo "Building Fuzz testing jar..."
+  mvn package -DskipTests

Review Comment:
   Fuzz testing jar is built in either case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2492487164


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar"
+COMET_FUZZ_JAR="target/$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  cd ..

Review Comment:
   I'm following instructions in README to run `mvn install -DskipTests`  at the root level. Which flag is also needed?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "coderfender (via GitHub)" <gi...@apache.org>.
coderfender commented on PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#issuecomment-3488654440

   This is awesome ! @manuzhang  . 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#issuecomment-3514493110

   @comphead Done! Please take another look. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2509219225


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"

Review Comment:
   ```suggestion
   PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)" || {
     echo "Error: Failed to retrieve the project version from Maven" >&2
     exit 1
   }
   ```



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eux
+
+DIR="$(cd "$(dirname "$0")" && pwd)"
+PARENT_DIR="${DIR}/.."
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_ARTIFACT_ID="$(mvn -f ${PARENT_DIR}/spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"

Review Comment:
   ```suggestion
   COMET_SPARK_ARTIFACT_ID="$(mvn -f \"${PARENT_DIR}/spark/pom.xml\" -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add bash script to build and run fuzz testing [datafusion-comet]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #2686:
URL: https://github.com/apache/datafusion-comet/pull/2686#discussion_r2494852066


##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar"

Review Comment:
   It would be cleaner and easier to debug (with `set -x`) if you extract the sub-shell commands and assign their results to their own variables.
   E.g. 
   ```
   SPARK_ARTIFACT_ID="$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
   FUZZ_ARTIFACT_ID="$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
   COMET_SPARK_JAR="../spark/target/${SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
   COMET_FUZZ_JAR="target/${FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
   ```



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+

Review Comment:
   You may want to add some logic to detect the current working directory.
   At the moment this script assumes that it is called with `./run.sh` but some user may try to run it from the parent folder with `./fuzz-testing/run.sh`.



##########
fuzz-testing/run.sh:
##########
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -eu
+
+SPARK_MASTER="${SPARK_MASTER:-local[*]}"
+PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)"
+COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar"
+COMET_FUZZ_JAR="target/$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}-jar-with-dependencies.jar"
+NUM_FILES="${NUM_FILES:-2}"
+NUM_ROWS="${NUM_ROWS:-200}"
+NUM_QUERIES="${NUM_QUERIES:-500}"
+
+if [ ! -f "${COMET_SPARK_JAR}" ]; then
+  echo "Building Comet Spark jar..."
+  cd ..
+  mvn install -DskipTests
+  cd fuzz-testing

Review Comment:
   I think you can avoid navigating the folders with `cd` by using `mvn -f ../pom.xml ...`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org