Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore](orc) Update orc lib to third party lib(1.8.3) using git submodule. #18531

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

kaka11chen
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

Problem summary

Describe your changes.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions github-actions bot added the kind/docs Categorizes issue or PR as related to documentation. label Apr 10, 2023
@github-actions
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck ' returned error 1 finding the following syntactical issues:

----------

In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 1:
if [ -z "$1" ]; then
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
   ^---------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ -z "$1" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 5:
if [ ! -d "$1" ]; then
   ^-----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ ! -d "$1" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 8:
if [ ! -d "$1/hadoop-hdfs-project" ]; then
   ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ ! -d "$1/hadoop-hdfs-project" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 13:
echo HADOOP_ROOT=$HADOOP_ROOT
                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo HADOOP_ROOT="$HADOOP_ROOT"


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 14:
OUT=$(readlink -m `dirname $0`)
                  ^----------^ SC2046 (warning): Quote this to prevent word splitting.
                  ^----------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
OUT=$(readlink -m $(dirname "$0"))


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 15:
echo OUT=$OUT
         ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
         ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo OUT="$OUT"


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 16:
TS=$OUT/imported_timestamp
   ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
TS=${OUT}/imported_timestamp


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 18:
    cd $HADOOP_ROOT &&
       ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cd "$HADOOP_ROOT" &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 20:
    (date > $TS; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \
            ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
            ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                 ^-- SC2129 (style): Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                                    ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                                         ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                         ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    (date > "$TS"; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 21:
        echo "diffs: --------------" >> $TS; git diff HEAD >> $TS; \
                                        ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                        ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                              ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                              ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
        echo "diffs: --------------" >> "$TS"; git diff HEAD >> $TS; \


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 22:
        echo "       --------------" >> $TS)
                                        ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                        ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
        echo "       --------------" >> "$TS")


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 23:
    cd $OUT &&
       ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cd "$OUT" &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 26:
    cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&
          ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
          ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cp -R "$HADOOP_ROOT"/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 27:
    cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&
          ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
          ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cp -R "$HADOOP_ROOT"/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 29:
	tar -czf ../libhdfspp.tar.gz * &&
                                     ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options.


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 32:
	date >> $TS
                ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
	date >> "$TS"


In be/src/apache-orc/docker/reinit.sh line 18:
start=`date`
      ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
start=$(date)


In be/src/apache-orc/docker/reinit.sh line 20:
TARGET=${@:-`cat os-list.txt`}
       ^---------------------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
            ^---------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
TARGET=${@:-$(cat os-list.txt)}


In be/src/apache-orc/docker/reinit.sh line 21:
echo "Target:" $TARGET
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
               ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Target:" "$TARGET"


In be/src/apache-orc/docker/reinit.sh line 23:
for build in $TARGET; do
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
for build in ${TARGET}; do


In be/src/apache-orc/docker/reinit.sh line 24:
  OS=$(echo "$build" | cut -d '_' -f1)
             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  OS=$(echo "${build}" | cut -d '_' -f1)


In be/src/apache-orc/docker/reinit.sh line 25:
  REST=$(echo "$build" | cut -d '_' -f2- -s)
               ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  REST=$(echo "${build}" | cut -d '_' -f2- -s)


In be/src/apache-orc/docker/reinit.sh line 26:
  if [ -z "$REST" ]; then
     ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
           ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ -z "${REST}" ]]; then


In be/src/apache-orc/docker/reinit.sh line 29:
    ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
                 ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    ARGS=$(echo "${REST}" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')


In be/src/apache-orc/docker/reinit.sh line 31:
  TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
                             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  TAG=$(echo "apache/orc-dev:${build}" | sed -e 's/=/-/g')


In be/src/apache-orc/docker/reinit.sh line 32:
  echo "Re-initialize $TAG"
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Re-initialize ${TAG}"


In be/src/apache-orc/docker/reinit.sh line 33:
  ( cd $OS && docker build --no-cache -t "$TAG" $ARGS . )
       ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                          ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  ( cd "$OS" && docker build --no-cache -t "$TAG" $ARGS . )


In be/src/apache-orc/docker/reinit.sh line 35:
echo "Start: $start"
             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Start: ${start}"


In be/src/apache-orc/docker/reinit.sh line 36:
echo "End:" `date`
            ^----^ SC2046 (warning): Quote this to prevent word splitting.
            ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
echo "End:" $(date)


In be/src/apache-orc/docker/run-all.sh line 19:
URL=https://github.com/$GITHUB_USER/orc.git
                       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
URL=https://github.com/${GITHUB_USER}/orc.git


In be/src/apache-orc/docker/run-all.sh line 22:
CLONE="git clone $URL -b $BRANCH"
^---^ SC2034 (warning): CLONE appears unused. Verify use (or export if used externally).
                 ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                         ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
CLONE="git clone ${URL} -b ${BRANCH}"


In be/src/apache-orc/docker/run-all.sh line 23:
MAKEDIR="mkdir orc/build && cd orc/build"
^-----^ SC2034 (warning): MAKEDIR appears unused. Verify use (or export if used externally).


In be/src/apache-orc/docker/run-all.sh line 24:
VOLUME="--volume m2cache:/root/.m2/repository"
^----^ SC2034 (warning): VOLUME appears unused. Verify use (or export if used externally).


In be/src/apache-orc/docker/run-all.sh line 34:
start=`date`
      ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
start=$(date)


In be/src/apache-orc/docker/run-all.sh line 36:
for build in `cat os-list.txt`; do
             ^---------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.
             ^---------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
for build in $(cat os-list.txt); do


In be/src/apache-orc/docker/run-all.sh line 37:
    ./run-one.sh $1 $2 $build > logs/$build-test.log 2>&1 &
                 ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                    ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                       ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                       ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                     ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                     ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    ./run-one.sh "$1" "$2" "$build" > logs/$build-test.log 2>&1 &


In be/src/apache-orc/docker/run-all.sh line 39:
    echo "Launching $build as $!"
                    ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "Launching ${build} as $!"


In be/src/apache-orc/docker/run-all.sh line 42:
for job in `cat logs/pids.txt`; do
           ^-----------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.
           ^-----------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
for job in $(cat logs/pids.txt); do


In be/src/apache-orc/docker/run-all.sh line 43:
    echo "Waiting for $job"
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "Waiting for ${job}"


In be/src/apache-orc/docker/run-all.sh line 44:
    wait $job || failure
         ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
         ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    wait "$job" || failure


In be/src/apache-orc/docker/run-all.sh line 48:
echo "Test start: $start"
                  ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Test start: ${start}"


In be/src/apache-orc/docker/run-all.sh line 49:
echo "End:" `date`
            ^----^ SC2046 (warning): Quote this to prevent word splitting.
            ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
echo "End:" $(date)


In be/src/apache-orc/docker/run-one.sh line 19:
URL=https://github.com/$GITHUB_USER/orc.git
                       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
URL=https://github.com/${GITHUB_USER}/orc.git


In be/src/apache-orc/docker/run-one.sh line 24:
    echo "FAILED $BUILD"
                 ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "FAILED ${BUILD}"


In be/src/apache-orc/docker/run-one.sh line 29:
TAG=$(echo "apache/orc-dev:$BUILD" | sed -e 's/=/-/g')
                           ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
TAG=$(echo "apache/orc-dev:${BUILD}" | sed -e 's/=/-/g')


In be/src/apache-orc/docker/run-one.sh line 30:
if [ $GITHUB_USER == "local" ]; then
   ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
     ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
     ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
if [[ "$GITHUB_USER" == "local" ]]; then


In be/src/apache-orc/docker/run-one.sh line 31:
  BRANCH=`git status| head -1 | sed -e 's/On branch //'`
         ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
  BRANCH=$(git status| head -1 | sed -e 's/On branch //')


In be/src/apache-orc/docker/run-one.sh line 32:
  echo "Started local run for $BRANCH on $BUILD at $(date)"
                              ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                         ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Started local run for ${BRANCH} on ${BUILD} at $(date)"


In be/src/apache-orc/docker/run-one.sh line 33:
  docker run $VOLUME -v`pwd`/..:/root/orc "$TAG" || failure
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                       ^---^ SC2046 (warning): Quote this to prevent word splitting.
                       ^---^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                                           ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  docker run "$VOLUME" -v`pwd`/..:/root/orc "$TAG" || failure


In be/src/apache-orc/docker/run-one.sh line 35:
  CLONE="git clone $URL -b $BRANCH"
                   ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                           ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  CLONE="git clone ${URL} -b ${BRANCH}"


In be/src/apache-orc/docker/run-one.sh line 38:
  echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
                ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                        ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Started ${GITHUB_USER}/${BRANCH} on ${BUILD} at $(date)"


In be/src/apache-orc/docker/run-one.sh line 40:
  docker run $VOLUME "$TAG" /bin/bash --login -c \
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  docker run "$VOLUME" "$TAG" /bin/bash --login -c \


In be/src/apache-orc/docker/run-one.sh line 41:
     "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
      ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                  ^---^ SC2154 (warning): OPTS is referenced but not assigned.
                                  ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
     "${CLONE} && ${MAKEDIR} && cmake ${OPTS} .. && make package test-out" \


In be/src/apache-orc/docker/run-one.sh line 44:
echo "Finished $BUILD at $(date)"
               ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Finished ${BUILD} at $(date)"


In be/src/apache-orc/java/bench/fetch-data.sh line 1:
#!/usr/bin/env zsh
^-- SC1071 (error): ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!


In be/src/apache-orc/java/mvnw line 41:
  if [ -z "$3" -o ! -f "$binary" ]; then
     ^---------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
               ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
                        ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [ -z "$3" -o ! -f "${binary}" ]; then


In be/src/apache-orc/java/mvnw line 45:
    [ ! -f "${local_tarball}" ] && [ $(command -v curl) ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                   ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                     ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
                                     ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && [[ -n $(command -v curl) ]] && \


In be/src/apache-orc/java/mvnw line 47:
      curl ${curl_opts} "${remote_tarball}" > "${local_tarball}"
           ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      curl "${curl_opts}" "${remote_tarball}" > "${local_tarball}"


In be/src/apache-orc/java/mvnw line 49:
    [ ! -f "${local_tarball}" ] && [ $(command -v wget) ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                   ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                     ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
                                     ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && [[ -n $(command -v wget) ]] && \


In be/src/apache-orc/java/mvnw line 51:
      wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
           ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters.

Did you mean: 
      wget "${wget_opts}" -O "${local_tarball}" "${remote_tarball}"


In be/src/apache-orc/java/mvnw line 53:
    [ ! -f "${local_tarball}" ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && \


In be/src/apache-orc/java/mvnw line 67:
  local MVN_VERSION=`grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}'`
        ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                    ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
  local MVN_VERSION=$(grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}')


In be/src/apache-orc/java/mvnw line 69:
  if [ "$MVN_BIN" ]; then
     ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
       ^--------^ SC2244 (style): Prefer explicit -n to check non-empty string (or use =/-ne to check boolean/integer).
        ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ -n "${MVN_BIN}" ]]; then


In be/src/apache-orc/java/mvnw line 70:
    local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In be/src/apache-orc/java/mvnw line 72:
  if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
     ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
       ^-- SC2046 (warning): Quote this to prevent word splitting.
                 ^-------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^-------------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                            ^---------------------^ SC2046 (warning): Quote this to prevent word splitting.
                                                      ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                      ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ $(version "$MVN_DETECTED_VERSION") -lt $(version $MVN_VERSION) ]]; then


In be/src/apache-orc/java/mvnw line 74:
    if [ $(command -v curl) ]; then
       ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
         ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
         ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    if [[ -n $(command -v curl) ]]; then


In be/src/apache-orc/java/mvnw line 76:
      if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL" ; then
                                                              ^--------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
      if ! curl -L --output /dev/null --silent --head --fail "${TEST_MIRROR_URL}" ; then


In be/src/apache-orc/java/mvnw line 96:
cd "${_CALLING_DIR}"
^------------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Did you mean: 
cd "${_CALLING_DIR}" || exit


In be/src/apache-orc/java/mvnw line 99:
export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
                                 ^----------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
export MAVEN_OPTS=${MAVEN_OPTS:-"${_COMPILE_JVM_OPTS}"}


In be/src/apache-orc/java/mvnw line 101:
echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
                               ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Using \`mvn\` from path: ${MVN_BIN}" 1>&2

For more information:
  https://www.shellcheck.net/wiki/SC1071 -- ShellCheck only supports sh/bash/...
  https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
  https://www.shellcheck.net/wiki/SC2034 -- CLONE appears unused. Verify use ...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt ' returned error 1 finding the following formatting issues:

----------
--- be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh.orig
+++ be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh
@@ -1,6 +1,6 @@
 if [ -z "$1" ]; then
     echo "Usage: pull_hdfs [path_to_hdfs_git_root]"
-    exit 1;
+    exit 1
 fi
 if [ ! -d "$1" ]; then
     echo "$1 is not a directory"
@@ -11,22 +11,27 @@
 
 HADOOP_ROOT=$1
 echo HADOOP_ROOT=$HADOOP_ROOT
-OUT=$(readlink -m `dirname $0`)
+OUT=$(readlink -m $(dirname $0))
 echo OUT=$OUT
 TS=$OUT/imported_timestamp
 
-    cd $HADOOP_ROOT &&
+cd $HADOOP_ROOT &&
     mvn -pl :hadoop-hdfs-native-client -Pnative compile -Dnative_make_args="copy_hadoop_files"
-    (date > $TS; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \
-        echo "diffs: --------------" >> $TS; git diff HEAD >> $TS; \
-        echo "       --------------" >> $TS)
-    cd $OUT &&
+(
+    date >$TS
+    git rev-parse --abbrev-ref HEAD >>$TS
+    git log -n 1 >>$TS
+    echo "diffs: --------------" >>$TS
+    git diff HEAD >>$TS
+    echo "       --------------" >>$TS
+)
+cd $OUT &&
     #Delete everything except for pull_hdfs.sh and imported_timestamp
     find . ! -name 'pull_hdfs.sh' ! -name 'imported_timestamp' ! -name '.' ! -name '..' -exec rm -rf {} + &&
     cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&
     cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&
     cd libhdfspp &&
-	tar -czf ../libhdfspp.tar.gz * &&
-	cd .. &&
-	rm -rf libhdfspp &&
-	date >> $TS
+    tar -czf ../libhdfspp.tar.gz * &&
+    cd .. &&
+    rm -rf libhdfspp &&
+    date >>$TS
--- be/src/apache-orc/docker/reinit.sh.orig
+++ be/src/apache-orc/docker/reinit.sh
@@ -15,22 +15,22 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-start=`date`
+start=$(date)
 
-TARGET=${@:-`cat os-list.txt`}
+TARGET=${@:-$(cat os-list.txt)}
 echo "Target:" $TARGET
 
 for build in $TARGET; do
-  OS=$(echo "$build" | cut -d '_' -f1)
-  REST=$(echo "$build" | cut -d '_' -f2- -s)
-  if [ -z "$REST" ]; then
-    ARGS=""
-  else
-    ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
-  fi
-  TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
-  echo "Re-initialize $TAG"
-  ( cd $OS && docker build --no-cache -t "$TAG" $ARGS . )
+    OS=$(echo "$build" | cut -d '_' -f1)
+    REST=$(echo "$build" | cut -d '_' -f2- -s)
+    if [ -z "$REST" ]; then
+        ARGS=""
+    else
+        ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
+    fi
+    TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
+    echo "Re-initialize $TAG"
+    (cd $OS && docker build --no-cache -t "$TAG" $ARGS .)
 done
 echo "Start: $start"
-echo "End:" `date`
+echo "End:" $(date)
--- be/src/apache-orc/docker/run-all.sh.orig
+++ be/src/apache-orc/docker/run-all.sh
@@ -31,19 +31,19 @@
 }
 rm -f logs/pids.txt logs/*.log
 
-start=`date`
+start=$(date)
 
-for build in `cat os-list.txt`; do
-    ./run-one.sh $1 $2 $build > logs/$build-test.log 2>&1 &
-    echo "$!" >> logs/pids.txt
+for build in $(cat os-list.txt); do
+    ./run-one.sh $1 $2 $build >logs/$build-test.log 2>&1 &
+    echo "$!" >>logs/pids.txt
     echo "Launching $build as $!"
 done
 
-for job in `cat logs/pids.txt`; do
+for job in $(cat logs/pids.txt); do
     echo "Waiting for $job"
     wait $job || failure
 done
 
 echo ""
 echo "Test start: $start"
-echo "End:" `date`
+echo "End:" $(date)
--- be/src/apache-orc/docker/run-one.sh.orig
+++ be/src/apache-orc/docker/run-one.sh
@@ -28,17 +28,17 @@
 VOLUME="--volume m2cache:/root/.m2/repository"
 TAG=$(echo "apache/orc-dev:$BUILD" | sed -e 's/=/-/g')
 if [ $GITHUB_USER == "local" ]; then
-  BRANCH=`git status| head -1 | sed -e 's/On branch //'`
-  echo "Started local run for $BRANCH on $BUILD at $(date)"
-  docker run $VOLUME -v`pwd`/..:/root/orc "$TAG" || failure
+    BRANCH=$(git status | head -1 | sed -e 's/On branch //')
+    echo "Started local run for $BRANCH on $BUILD at $(date)"
+    docker run $VOLUME -v$(pwd)/..:/root/orc "$TAG" || failure
 else
-  CLONE="git clone $URL -b $BRANCH"
-  MAKEDIR="mkdir orc/build && cd orc/build"
+    CLONE="git clone $URL -b $BRANCH"
+    MAKEDIR="mkdir orc/build && cd orc/build"
 
-  echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
+    echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
 
-  docker run $VOLUME "$TAG" /bin/bash --login -c \
-     "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
-       || failure
+    docker run $VOLUME "$TAG" /bin/bash --login -c \
+        "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" ||
+        failure
 fi
 echo "Finished $BUILD at $(date)"
--- be/src/apache-orc/java/bench/fetch-data.sh.orig
+++ be/src/apache-orc/java/bench/fetch-data.sh
@@ -16,8 +16,17 @@
 # limitations under the License.
 set -e
 mkdir -p data/sources/taxi
-(cd data/sources/taxi; wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-11.parquet )
-(cd data/sources/taxi; wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-12.parquet )
+(
+    cd data/sources/taxi
+    wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-11.parquet
+)
+(
+    cd data/sources/taxi
+    wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-12.parquet
+)
 
 mkdir -p data/sources/github
-(cd data/sources/github; wget http://data.gharchive.org/2015-11-{01..15}-{0..23}.json.gz)
+(
+    cd data/sources/github
+    wget http://data.gharchive.org/2015-11-{01..15}-{0..23}.json.gz
+)
--- be/src/apache-orc/java/mvnw.orig
+++ be/src/apache-orc/java/mvnw
@@ -18,7 +18,7 @@
 #
 
 # Determine the current working directory
-_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 # Preserve the calling directory
 _CALLING_DIR="$(pwd)"
 # Options used during compilation
@@ -31,31 +31,31 @@
 ## Arg2 - Tarball Name
 ## Arg3 - Checkable Binary
 install_app() {
-  local remote_tarball="$1/$2"
-  local local_tarball="${_DIR}/build/$2"
-  local binary="${_DIR}/build/$3"
+	local remote_tarball="$1/$2"
+	local local_tarball="${_DIR}/build/$2"
+	local binary="${_DIR}/build/$3"
 
-  local curl_opts="--silent --show-error -L"
-  local wget_opts="--no-verbose"
+	local curl_opts="--silent --show-error -L"
+	local wget_opts="--no-verbose"
 
-  if [ -z "$3" -o ! -f "$binary" ]; then
-    # check if we already have the tarball
-    # check if we have curl installed
-    # download application
-    [ ! -f "${local_tarball}" ] && [ $(command -v curl) ] && \
-      echo "exec: curl ${curl_opts} ${remote_tarball}" 1>&2 && \
-      curl ${curl_opts} "${remote_tarball}" > "${local_tarball}"
-    # if the file still doesn't exist, lets try `wget` and cross our fingers
-    [ ! -f "${local_tarball}" ] && [ $(command -v wget) ] && \
-      echo "exec: wget ${wget_opts} ${remote_tarball}" 1>&2 && \
-      wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
-    # if both were unsuccessful, exit
-    [ ! -f "${local_tarball}" ] && \
-      echo -n "ERROR: Cannot download $2 with cURL or wget; " && \
-      echo "please install manually and try again." && \
-      exit 2
-    cd "${_DIR}/build" && tar -xzf "$2"
-  fi
+	if [ -z "$3" -o ! -f "$binary" ]; then
+		# check if we already have the tarball
+		# check if we have curl installed
+		# download application
+		[ ! -f "${local_tarball}" ] && [ $(command -v curl) ] &&
+			echo "exec: curl ${curl_opts} ${remote_tarball}" 1>&2 &&
+			curl ${curl_opts} "${remote_tarball}" >"${local_tarball}"
+		# if the file still doesn't exist, lets try `wget` and cross our fingers
+		[ ! -f "${local_tarball}" ] && [ $(command -v wget) ] &&
+			echo "exec: wget ${wget_opts} ${remote_tarball}" 1>&2 &&
+			wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
+		# if both were unsuccessful, exit
+		[ ! -f "${local_tarball}" ] &&
+			echo -n "ERROR: Cannot download $2 with cURL or wget; " &&
+			echo "please install manually and try again." &&
+			exit 2
+		cd "${_DIR}/build" && tar -xzf "$2"
+	fi
 }
 
 # See simple version normalization: http://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
@@ -64,30 +64,30 @@
 # Determine the Maven version from the root pom.xml file and
 # install maven under the build/ folder if needed.
 install_mvn() {
-  local MVN_VERSION=`grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}'`
-  MVN_BIN="$(command -v mvn)"
-  if [ "$MVN_BIN" ]; then
-    local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
-  fi
-  if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
-    local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua?action=download&filename='}
-    if [ $(command -v curl) ]; then
-      local TEST_MIRROR_URL="${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz"
-      if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL" ; then
-        # Fall back to archive.apache.org for older Maven
-        echo "Falling back to archive.apache.org to download Maven"
-        APACHE_MIRROR="https://archive.apache.org/dist"
-      fi
-    fi
+	local MVN_VERSION=$(grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}')
+	MVN_BIN="$(command -v mvn)"
+	if [ "$MVN_BIN" ]; then
+		local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
+	fi
+	if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
+		local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua?action=download&filename='}
+		if [ $(command -v curl) ]; then
+			local TEST_MIRROR_URL="${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz"
+			if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL"; then
+				# Fall back to archive.apache.org for older Maven
+				echo "Falling back to archive.apache.org to download Maven"
+				APACHE_MIRROR="https://archive.apache.org/dist"
+			fi
+		fi
 
-    mkdir -p build
-    install_app \
-      "${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
-      "apache-maven-${MVN_VERSION}-bin.tar.gz" \
-      "build/apache-maven-${MVN_VERSION}/bin/mvn"
+		mkdir -p build
+		install_app \
+			"${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
+			"apache-maven-${MVN_VERSION}-bin.tar.gz" \
+			"build/apache-maven-${MVN_VERSION}/bin/mvn"
 
-    MVN_BIN="${_DIR}/build/apache-maven-${MVN_VERSION}/bin/mvn"
-  fi
+		MVN_BIN="${_DIR}/build/apache-maven-${MVN_VERSION}/bin/mvn"
+	fi
 }
 
 install_mvn
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt  -w filename


@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck ' returned error 1 finding the following syntactical issues:

----------

In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 1:
if [ -z "$1" ]; then
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
   ^---------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ -z "$1" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 5:
if [ ! -d "$1" ]; then
   ^-----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ ! -d "$1" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 8:
if [ ! -d "$1/hadoop-hdfs-project" ]; then
   ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
if [[ ! -d "$1/hadoop-hdfs-project" ]]; then


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 13:
echo HADOOP_ROOT=$HADOOP_ROOT
                 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo HADOOP_ROOT="$HADOOP_ROOT"


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 14:
OUT=$(readlink -m `dirname $0`)
                  ^----------^ SC2046 (warning): Quote this to prevent word splitting.
                  ^----------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                           ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
OUT=$(readlink -m $(dirname "$0"))


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 15:
echo OUT=$OUT
         ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
         ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo OUT="$OUT"


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 16:
TS=$OUT/imported_timestamp
   ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
TS=${OUT}/imported_timestamp


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 18:
    cd $HADOOP_ROOT &&
       ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cd "$HADOOP_ROOT" &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 20:
    (date > $TS; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \
            ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
            ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                 ^-- SC2129 (style): Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                                    ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                                         ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                         ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    (date > "$TS"; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 21:
        echo "diffs: --------------" >> $TS; git diff HEAD >> $TS; \
                                        ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                        ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                              ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                              ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
        echo "diffs: --------------" >> "$TS"; git diff HEAD >> $TS; \


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 22:
        echo "       --------------" >> $TS)
                                        ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                        ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
        echo "       --------------" >> "$TS")


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 23:
    cd $OUT &&
       ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cd "$OUT" &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 26:
    cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&
          ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
          ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cp -R "$HADOOP_ROOT"/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 27:
    cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&
          ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
          ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    cp -R "$HADOOP_ROOT"/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 29:
	tar -czf ../libhdfspp.tar.gz * &&
                                     ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options.


In be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh line 32:
	date >> $TS
                ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
                ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
	date >> "$TS"


In be/src/apache-orc/docker/reinit.sh line 18:
start=`date`
      ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
start=$(date)


In be/src/apache-orc/docker/reinit.sh line 20:
TARGET=${@:-`cat os-list.txt`}
       ^---------------------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
            ^---------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
TARGET=${@:-$(cat os-list.txt)}


In be/src/apache-orc/docker/reinit.sh line 21:
echo "Target:" $TARGET
               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
               ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Target:" "$TARGET"


In be/src/apache-orc/docker/reinit.sh line 23:
for build in $TARGET; do
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
for build in ${TARGET}; do


In be/src/apache-orc/docker/reinit.sh line 24:
  OS=$(echo "$build" | cut -d '_' -f1)
             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  OS=$(echo "${build}" | cut -d '_' -f1)


In be/src/apache-orc/docker/reinit.sh line 25:
  REST=$(echo "$build" | cut -d '_' -f2- -s)
               ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  REST=$(echo "${build}" | cut -d '_' -f2- -s)


In be/src/apache-orc/docker/reinit.sh line 26:
  if [ -z "$REST" ]; then
     ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
           ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ -z "${REST}" ]]; then


In be/src/apache-orc/docker/reinit.sh line 29:
    ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
                 ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    ARGS=$(echo "${REST}" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')


In be/src/apache-orc/docker/reinit.sh line 31:
  TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
                             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  TAG=$(echo "apache/orc-dev:${build}" | sed -e 's/=/-/g')


In be/src/apache-orc/docker/reinit.sh line 32:
  echo "Re-initialize $TAG"
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Re-initialize ${TAG}"


In be/src/apache-orc/docker/reinit.sh line 33:
  ( cd $OS && docker build --no-cache -t "$TAG" $ARGS . )
       ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
       ^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                          ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                                ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  ( cd "$OS" && docker build --no-cache -t "$TAG" $ARGS . )


In be/src/apache-orc/docker/reinit.sh line 35:
echo "Start: $start"
             ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Start: ${start}"


In be/src/apache-orc/docker/reinit.sh line 36:
echo "End:" `date`
            ^----^ SC2046 (warning): Quote this to prevent word splitting.
            ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
echo "End:" $(date)


In be/src/apache-orc/docker/run-all.sh line 19:
URL=https://github.com/$GITHUB_USER/orc.git
                       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
URL=https://github.com/${GITHUB_USER}/orc.git


In be/src/apache-orc/docker/run-all.sh line 22:
CLONE="git clone $URL -b $BRANCH"
^---^ SC2034 (warning): CLONE appears unused. Verify use (or export if used externally).
                 ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                         ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
CLONE="git clone ${URL} -b ${BRANCH}"


In be/src/apache-orc/docker/run-all.sh line 23:
MAKEDIR="mkdir orc/build && cd orc/build"
^-----^ SC2034 (warning): MAKEDIR appears unused. Verify use (or export if used externally).


In be/src/apache-orc/docker/run-all.sh line 24:
VOLUME="--volume m2cache:/root/.m2/repository"
^----^ SC2034 (warning): VOLUME appears unused. Verify use (or export if used externally).


In be/src/apache-orc/docker/run-all.sh line 34:
start=`date`
      ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
start=$(date)


In be/src/apache-orc/docker/run-all.sh line 36:
for build in `cat os-list.txt`; do
             ^---------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.
             ^---------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
for build in $(cat os-list.txt); do


In be/src/apache-orc/docker/run-all.sh line 37:
    ./run-one.sh $1 $2 $build > logs/$build-test.log 2>&1 &
                 ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                    ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                       ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                       ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                     ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                     ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    ./run-one.sh "$1" "$2" "$build" > logs/$build-test.log 2>&1 &


In be/src/apache-orc/docker/run-all.sh line 39:
    echo "Launching $build as $!"
                    ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "Launching ${build} as $!"


In be/src/apache-orc/docker/run-all.sh line 42:
for job in `cat logs/pids.txt`; do
           ^-----------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.
           ^-----------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
for job in $(cat logs/pids.txt); do


In be/src/apache-orc/docker/run-all.sh line 43:
    echo "Waiting for $job"
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "Waiting for ${job}"


In be/src/apache-orc/docker/run-all.sh line 44:
    wait $job || failure
         ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
         ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    wait "$job" || failure


In be/src/apache-orc/docker/run-all.sh line 48:
echo "Test start: $start"
                  ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Test start: ${start}"


In be/src/apache-orc/docker/run-all.sh line 49:
echo "End:" `date`
            ^----^ SC2046 (warning): Quote this to prevent word splitting.
            ^----^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
echo "End:" $(date)


In be/src/apache-orc/docker/run-one.sh line 19:
URL=https://github.com/$GITHUB_USER/orc.git
                       ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
URL=https://github.com/${GITHUB_USER}/orc.git


In be/src/apache-orc/docker/run-one.sh line 24:
    echo "FAILED $BUILD"
                 ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
    echo "FAILED ${BUILD}"


In be/src/apache-orc/docker/run-one.sh line 29:
TAG=$(echo "apache/orc-dev:$BUILD" | sed -e 's/=/-/g')
                           ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
TAG=$(echo "apache/orc-dev:${BUILD}" | sed -e 's/=/-/g')


In be/src/apache-orc/docker/run-one.sh line 30:
if [ $GITHUB_USER == "local" ]; then
   ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
     ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
     ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
if [[ "$GITHUB_USER" == "local" ]]; then


In be/src/apache-orc/docker/run-one.sh line 31:
  BRANCH=`git status| head -1 | sed -e 's/On branch //'`
         ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
  BRANCH=$(git status| head -1 | sed -e 's/On branch //')


In be/src/apache-orc/docker/run-one.sh line 32:
  echo "Started local run for $BRANCH on $BUILD at $(date)"
                              ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                         ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Started local run for ${BRANCH} on ${BUILD} at $(date)"


In be/src/apache-orc/docker/run-one.sh line 33:
  docker run $VOLUME -v`pwd`/..:/root/orc "$TAG" || failure
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                       ^---^ SC2046 (warning): Quote this to prevent word splitting.
                       ^---^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
                                           ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  docker run "$VOLUME" -v`pwd`/..:/root/orc "$TAG" || failure


In be/src/apache-orc/docker/run-one.sh line 35:
  CLONE="git clone $URL -b $BRANCH"
                   ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                           ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  CLONE="git clone ${URL} -b ${BRANCH}"


In be/src/apache-orc/docker/run-one.sh line 38:
  echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
                ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                        ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  echo "Started ${GITHUB_USER}/${BRANCH} on ${BUILD} at $(date)"


In be/src/apache-orc/docker/run-one.sh line 40:
  docker run $VOLUME "$TAG" /bin/bash --login -c \
             ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
             ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                      ^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  docker run "$VOLUME" "$TAG" /bin/bash --login -c \


In be/src/apache-orc/docker/run-one.sh line 41:
     "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
      ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                  ^---^ SC2154 (warning): OPTS is referenced but not assigned.
                                  ^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
     "${CLONE} && ${MAKEDIR} && cmake ${OPTS} .. && make package test-out" \


In be/src/apache-orc/docker/run-one.sh line 44:
echo "Finished $BUILD at $(date)"
               ^----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Finished ${BUILD} at $(date)"


In be/src/apache-orc/java/bench/fetch-data.sh line 1:
#!/usr/bin/env zsh
^-- SC1071 (error): ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!


In be/src/apache-orc/java/mvnw line 41:
  if [ -z "$3" -o ! -f "$binary" ]; then
     ^---------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
               ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
                        ^-----^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [ -z "$3" -o ! -f "${binary}" ]; then


In be/src/apache-orc/java/mvnw line 45:
    [ ! -f "${local_tarball}" ] && [ $(command -v curl) ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                   ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                     ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
                                     ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && [[ -n $(command -v curl) ]] && \


In be/src/apache-orc/java/mvnw line 47:
      curl ${curl_opts} "${remote_tarball}" > "${local_tarball}"
           ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
      curl "${curl_opts}" "${remote_tarball}" > "${local_tarball}"


In be/src/apache-orc/java/mvnw line 49:
    [ ! -f "${local_tarball}" ] && [ $(command -v wget) ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                   ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                     ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
                                     ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && [[ -n $(command -v wget) ]] && \


In be/src/apache-orc/java/mvnw line 51:
      wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
           ^----------^ SC2248 (style): Prefer double quoting even when variables don't contain special characters.

Did you mean: 
      wget "${wget_opts}" -O "${local_tarball}" "${remote_tarball}"


In be/src/apache-orc/java/mvnw line 53:
    [ ! -f "${local_tarball}" ] && \
    ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Did you mean: 
    [[ ! -f "${local_tarball}" ]] && \


In be/src/apache-orc/java/mvnw line 67:
  local MVN_VERSION=`grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}'`
        ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                    ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean: 
  local MVN_VERSION=$(grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}')


In be/src/apache-orc/java/mvnw line 69:
  if [ "$MVN_BIN" ]; then
     ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
       ^--------^ SC2244 (style): Prefer explicit -n to check non-empty string (or use =/-ne to check boolean/integer).
        ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ -n "${MVN_BIN}" ]]; then


In be/src/apache-orc/java/mvnw line 70:
    local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
          ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In be/src/apache-orc/java/mvnw line 72:
  if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
     ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
       ^-- SC2046 (warning): Quote this to prevent word splitting.
                 ^-------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^-------------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
                                            ^---------------------^ SC2046 (warning): Quote this to prevent word splitting.
                                                      ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                      ^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
  if [[ $(version "$MVN_DETECTED_VERSION") -lt $(version $MVN_VERSION) ]]; then


In be/src/apache-orc/java/mvnw line 74:
    if [ $(command -v curl) ]; then
       ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
         ^----------------^ SC2046 (warning): Quote this to prevent word splitting.
         ^----------------^ SC2243 (style): Prefer explicit -n to check for output (or run command without [/[[ to check for success).

Did you mean: 
    if [[ -n $(command -v curl) ]]; then


In be/src/apache-orc/java/mvnw line 76:
      if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL" ; then
                                                              ^--------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
      if ! curl -L --output /dev/null --silent --head --fail "${TEST_MIRROR_URL}" ; then


In be/src/apache-orc/java/mvnw line 96:
cd "${_CALLING_DIR}"
^------------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Did you mean: 
cd "${_CALLING_DIR}" || exit


In be/src/apache-orc/java/mvnw line 99:
export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
                                 ^----------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
export MAVEN_OPTS=${MAVEN_OPTS:-"${_COMPILE_JVM_OPTS}"}


In be/src/apache-orc/java/mvnw line 101:
echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
                               ^------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Did you mean: 
echo "Using \`mvn\` from path: ${MVN_BIN}" 1>&2

For more information:
  https://www.shellcheck.net/wiki/SC1071 -- ShellCheck only supports sh/bash/...
  https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
  https://www.shellcheck.net/wiki/SC2034 -- CLONE appears unused. Verify use ...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors

'shfmt ' returned error 1 finding the following formatting issues:

----------
--- be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh.orig
+++ be/src/apache-orc/c++/libs/libhdfspp/pull_hdfs.sh
@@ -1,6 +1,6 @@
 if [ -z "$1" ]; then
     echo "Usage: pull_hdfs [path_to_hdfs_git_root]"
-    exit 1;
+    exit 1
 fi
 if [ ! -d "$1" ]; then
     echo "$1 is not a directory"
@@ -11,22 +11,27 @@
 
 HADOOP_ROOT=$1
 echo HADOOP_ROOT=$HADOOP_ROOT
-OUT=$(readlink -m `dirname $0`)
+OUT=$(readlink -m $(dirname $0))
 echo OUT=$OUT
 TS=$OUT/imported_timestamp
 
-    cd $HADOOP_ROOT &&
+cd $HADOOP_ROOT &&
     mvn -pl :hadoop-hdfs-native-client -Pnative compile -Dnative_make_args="copy_hadoop_files"
-    (date > $TS; git rev-parse --abbrev-ref HEAD >> $TS; git log -n 1 >> $TS;  \
-        echo "diffs: --------------" >> $TS; git diff HEAD >> $TS; \
-        echo "       --------------" >> $TS)
-    cd $OUT &&
+(
+    date >$TS
+    git rev-parse --abbrev-ref HEAD >>$TS
+    git log -n 1 >>$TS
+    echo "diffs: --------------" >>$TS
+    git diff HEAD >>$TS
+    echo "       --------------" >>$TS
+)
+cd $OUT &&
     #Delete everything except for pull_hdfs.sh and imported_timestamp
     find . ! -name 'pull_hdfs.sh' ! -name 'imported_timestamp' ! -name '.' ! -name '..' -exec rm -rf {} + &&
     cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp . &&
     cp -R $HADOOP_ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/target/main/native/libhdfspp/extern libhdfspp/ &&
     cd libhdfspp &&
-	tar -czf ../libhdfspp.tar.gz * &&
-	cd .. &&
-	rm -rf libhdfspp &&
-	date >> $TS
+    tar -czf ../libhdfspp.tar.gz * &&
+    cd .. &&
+    rm -rf libhdfspp &&
+    date >>$TS
--- be/src/apache-orc/docker/reinit.sh.orig
+++ be/src/apache-orc/docker/reinit.sh
@@ -15,22 +15,22 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-start=`date`
+start=$(date)
 
-TARGET=${@:-`cat os-list.txt`}
+TARGET=${@:-$(cat os-list.txt)}
 echo "Target:" $TARGET
 
 for build in $TARGET; do
-  OS=$(echo "$build" | cut -d '_' -f1)
-  REST=$(echo "$build" | cut -d '_' -f2- -s)
-  if [ -z "$REST" ]; then
-    ARGS=""
-  else
-    ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
-  fi
-  TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
-  echo "Re-initialize $TAG"
-  ( cd $OS && docker build --no-cache -t "$TAG" $ARGS . )
+    OS=$(echo "$build" | cut -d '_' -f1)
+    REST=$(echo "$build" | cut -d '_' -f2- -s)
+    if [ -z "$REST" ]; then
+        ARGS=""
+    else
+        ARGS=$(echo "$REST" | sed -e 's/^/--build-arg /' -e 's/_/ --build-arg /g')
+    fi
+    TAG=$(echo "apache/orc-dev:$build" | sed -e 's/=/-/g')
+    echo "Re-initialize $TAG"
+    (cd $OS && docker build --no-cache -t "$TAG" $ARGS .)
 done
 echo "Start: $start"
-echo "End:" `date`
+echo "End:" $(date)
--- be/src/apache-orc/docker/run-all.sh.orig
+++ be/src/apache-orc/docker/run-all.sh
@@ -31,19 +31,19 @@
 }
 rm -f logs/pids.txt logs/*.log
 
-start=`date`
+start=$(date)
 
-for build in `cat os-list.txt`; do
-    ./run-one.sh $1 $2 $build > logs/$build-test.log 2>&1 &
-    echo "$!" >> logs/pids.txt
+for build in $(cat os-list.txt); do
+    ./run-one.sh $1 $2 $build >logs/$build-test.log 2>&1 &
+    echo "$!" >>logs/pids.txt
     echo "Launching $build as $!"
 done
 
-for job in `cat logs/pids.txt`; do
+for job in $(cat logs/pids.txt); do
     echo "Waiting for $job"
     wait $job || failure
 done
 
 echo ""
 echo "Test start: $start"
-echo "End:" `date`
+echo "End:" $(date)
--- be/src/apache-orc/docker/run-one.sh.orig
+++ be/src/apache-orc/docker/run-one.sh
@@ -28,17 +28,17 @@
 VOLUME="--volume m2cache:/root/.m2/repository"
 TAG=$(echo "apache/orc-dev:$BUILD" | sed -e 's/=/-/g')
 if [ $GITHUB_USER == "local" ]; then
-  BRANCH=`git status| head -1 | sed -e 's/On branch //'`
-  echo "Started local run for $BRANCH on $BUILD at $(date)"
-  docker run $VOLUME -v`pwd`/..:/root/orc "$TAG" || failure
+    BRANCH=$(git status | head -1 | sed -e 's/On branch //')
+    echo "Started local run for $BRANCH on $BUILD at $(date)"
+    docker run $VOLUME -v$(pwd)/..:/root/orc "$TAG" || failure
 else
-  CLONE="git clone $URL -b $BRANCH"
-  MAKEDIR="mkdir orc/build && cd orc/build"
+    CLONE="git clone $URL -b $BRANCH"
+    MAKEDIR="mkdir orc/build && cd orc/build"
 
-  echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
+    echo "Started $GITHUB_USER/$BRANCH on $BUILD at $(date)"
 
-  docker run $VOLUME "$TAG" /bin/bash --login -c \
-     "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" \
-       || failure
+    docker run $VOLUME "$TAG" /bin/bash --login -c \
+        "$CLONE && $MAKEDIR && cmake $OPTS .. && make package test-out" ||
+        failure
 fi
 echo "Finished $BUILD at $(date)"
--- be/src/apache-orc/java/bench/fetch-data.sh.orig
+++ be/src/apache-orc/java/bench/fetch-data.sh
@@ -16,8 +16,17 @@
 # limitations under the License.
 set -e
 mkdir -p data/sources/taxi
-(cd data/sources/taxi; wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-11.parquet )
-(cd data/sources/taxi; wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-12.parquet )
+(
+    cd data/sources/taxi
+    wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-11.parquet
+)
+(
+    cd data/sources/taxi
+    wget https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2015-12.parquet
+)
 
 mkdir -p data/sources/github
-(cd data/sources/github; wget http://data.gharchive.org/2015-11-{01..15}-{0..23}.json.gz)
+(
+    cd data/sources/github
+    wget http://data.gharchive.org/2015-11-{01..15}-{0..23}.json.gz
+)
--- be/src/apache-orc/java/mvnw.orig
+++ be/src/apache-orc/java/mvnw
@@ -18,7 +18,7 @@
 #
 
 # Determine the current working directory
-_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 # Preserve the calling directory
 _CALLING_DIR="$(pwd)"
 # Options used during compilation
@@ -31,31 +31,31 @@
 ## Arg2 - Tarball Name
 ## Arg3 - Checkable Binary
 install_app() {
-  local remote_tarball="$1/$2"
-  local local_tarball="${_DIR}/build/$2"
-  local binary="${_DIR}/build/$3"
+	local remote_tarball="$1/$2"
+	local local_tarball="${_DIR}/build/$2"
+	local binary="${_DIR}/build/$3"
 
-  local curl_opts="--silent --show-error -L"
-  local wget_opts="--no-verbose"
+	local curl_opts="--silent --show-error -L"
+	local wget_opts="--no-verbose"
 
-  if [ -z "$3" -o ! -f "$binary" ]; then
-    # check if we already have the tarball
-    # check if we have curl installed
-    # download application
-    [ ! -f "${local_tarball}" ] && [ $(command -v curl) ] && \
-      echo "exec: curl ${curl_opts} ${remote_tarball}" 1>&2 && \
-      curl ${curl_opts} "${remote_tarball}" > "${local_tarball}"
-    # if the file still doesn't exist, lets try `wget` and cross our fingers
-    [ ! -f "${local_tarball}" ] && [ $(command -v wget) ] && \
-      echo "exec: wget ${wget_opts} ${remote_tarball}" 1>&2 && \
-      wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
-    # if both were unsuccessful, exit
-    [ ! -f "${local_tarball}" ] && \
-      echo -n "ERROR: Cannot download $2 with cURL or wget; " && \
-      echo "please install manually and try again." && \
-      exit 2
-    cd "${_DIR}/build" && tar -xzf "$2"
-  fi
+	if [ -z "$3" -o ! -f "$binary" ]; then
+		# check if we already have the tarball
+		# check if we have curl installed
+		# download application
+		[ ! -f "${local_tarball}" ] && [ $(command -v curl) ] &&
+			echo "exec: curl ${curl_opts} ${remote_tarball}" 1>&2 &&
+			curl ${curl_opts} "${remote_tarball}" >"${local_tarball}"
+		# if the file still doesn't exist, lets try `wget` and cross our fingers
+		[ ! -f "${local_tarball}" ] && [ $(command -v wget) ] &&
+			echo "exec: wget ${wget_opts} ${remote_tarball}" 1>&2 &&
+			wget ${wget_opts} -O "${local_tarball}" "${remote_tarball}"
+		# if both were unsuccessful, exit
+		[ ! -f "${local_tarball}" ] &&
+			echo -n "ERROR: Cannot download $2 with cURL or wget; " &&
+			echo "please install manually and try again." &&
+			exit 2
+		cd "${_DIR}/build" && tar -xzf "$2"
+	fi
 }
 
 # See simple version normalization: http://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
@@ -64,30 +64,30 @@
 # Determine the Maven version from the root pom.xml file and
 # install maven under the build/ folder if needed.
 install_mvn() {
-  local MVN_VERSION=`grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}'`
-  MVN_BIN="$(command -v mvn)"
-  if [ "$MVN_BIN" ]; then
-    local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
-  fi
-  if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
-    local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua?action=download&filename='}
-    if [ $(command -v curl) ]; then
-      local TEST_MIRROR_URL="${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz"
-      if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL" ; then
-        # Fall back to archive.apache.org for older Maven
-        echo "Falling back to archive.apache.org to download Maven"
-        APACHE_MIRROR="https://archive.apache.org/dist"
-      fi
-    fi
+	local MVN_VERSION=$(grep "<maven.version>" "${_DIR}/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}')
+	MVN_BIN="$(command -v mvn)"
+	if [ "$MVN_BIN" ]; then
+		local MVN_DETECTED_VERSION="$(mvn --version | head -n1 | awk '{print $3}')"
+	fi
+	if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
+		local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua?action=download&filename='}
+		if [ $(command -v curl) ]; then
+			local TEST_MIRROR_URL="${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz"
+			if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL"; then
+				# Fall back to archive.apache.org for older Maven
+				echo "Falling back to archive.apache.org to download Maven"
+				APACHE_MIRROR="https://archive.apache.org/dist"
+			fi
+		fi
 
-    mkdir -p build
-    install_app \
-      "${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
-      "apache-maven-${MVN_VERSION}-bin.tar.gz" \
-      "build/apache-maven-${MVN_VERSION}/bin/mvn"
+		mkdir -p build
+		install_app \
+			"${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
+			"apache-maven-${MVN_VERSION}-bin.tar.gz" \
+			"build/apache-maven-${MVN_VERSION}/bin/mvn"
 
-    MVN_BIN="${_DIR}/build/apache-maven-${MVN_VERSION}/bin/mvn"
-  fi
+		MVN_BIN="${_DIR}/build/apache-maven-${MVN_VERSION}/bin/mvn"
+	fi
 }
 
 install_mvn
----------

You can reformat the above files to meet shfmt's requirements by typing:

  shfmt  -w filename


@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@kaka11chen kaka11chen force-pushed the update-orc-submodule branch from 9a86c5e to 5275c57 Compare April 11, 2023 06:18
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@kaka11chen
Copy link
Contributor Author

kaka11chen commented Apr 11, 2023

run buildall

@hello-stephen
Copy link
Contributor

hello-stephen commented Apr 11, 2023

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 33.22 seconds
stream load tsv: 435 seconds loaded 74807831229 Bytes, about 164 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 73 seconds loaded 1101869774 Bytes, about 14 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230411155835_clickbench_pr_127690.html

@kaka11chen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the dependencies Pull requests that update a dependency file label Apr 11, 2023
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 11, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit 2209b71 into apache:master Apr 12, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Apr 21, 2023
Reminiscent pushed a commit to Reminiscent/doris that referenced this pull request May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dependencies Pull requests that update a dependency file kind/docs Categorizes issue or PR as related to documentation. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants