dwsmith1983 commented on code in PR #5365:
URL: https://github.com/apache/datafusion-comet/pull/5365#discussion_r3881827167


##########
contrib/delta-spark/dev/run-delta-regression.sh:
##########
@@ -0,0 +1,169 @@
+#!/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.
+#
+# Run Delta Lake's own Spark test suites against a Comet build with the
+# native Delta scan enabled. Clones delta at $DELTA_VERSION into $WORKDIR,
+# injects Comet into the test SparkSession (DeltaSQLCommandTest) and the
+# test classpath (unmanagedJars), then runs the given testOnly selectors.
+#
+# Usage:
+#   
COMET_JARS=/path/comet-spark.jar,/path/comet-contrib-delta.jar,/path/flatbuffers.jar
 \
+#   ./run-delta-regression.sh <workdir> 
'org.apache.spark.sql.delta.DeletionVectorsSuite' [...]
+#
+# Env:
+#   DELTA_VERSION  delta tag to test against (default 3.3.2)
+#   COMET_JARS     comma-separated jars added to the test classpath (required)
+#   JAVA_HOME      JDK for sbt (17 recommended)
+set -euo pipefail
+
+DELTA_VERSION="${DELTA_VERSION:-3.3.2}"
+WORKDIR="${1:?usage: run-delta-regression.sh <workdir> <suite> [...suites]}"
+shift
+[ $# -ge 1 ] || { echo "no suites given" >&2; exit 2; }
+: "${COMET_JARS:?COMET_JARS must list the comet jars}"
+
+# Resolve to an absolute path before the cd below: the log path is built from
+# $WORKDIR after we're already inside the Delta checkout, so a relative
+# argument would otherwise be re-anchored under $DELTA_DIR.
+mkdir -p "$WORKDIR"
+WORKDIR=$(cd "$WORKDIR" && pwd)
+
+IFS=',' read -ra _jars <<< "$COMET_JARS"
+for j in "${_jars[@]}"; do
+  [ -f "$j" ] || { echo "COMET_JARS entry not found: $j" >&2; exit 2; }

Review Comment:
   Fixed, jar paths are canonicalized during validation before the cd, same 
treatment as the workdir.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to