github-actions[bot] commented on PR #18587:
URL: https://github.com/apache/doris/pull/18587#issuecomment-1516587824

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/4756403533";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   'shellcheck ' found no issues.
   
   ```
   </details>
   
   <details>
   <summary>shfmt errors</summary>
   
   ```
   
   'shfmt ' returned error 1 finding the following formatting issues:
   
   ----------
   --- tools/get_query_profiles.sh.orig
   +++ tools/get_query_profiles.sh
   @@ -32,16 +32,16 @@
    fi
    
    while getopts ":q:o:" opt; do
   -  case "${opt}" in
   -     q)
   +    case "${opt}" in
   +    q)
            QUERY_ID="${OPTARG}"
   -         ;;
   -     o)
   +        ;;
   +    o)
            OUTPUT_DIR="${OPTARG}"
   -         ;;
   -     *)
   -         ;;
   -   esac
   +        ;;
   +    *) ;;
   +
   +    esac
    done
    
    if [[ -z "${QUERY_ID}" ]]; then
   @@ -62,25 +62,22 @@
    FRAGS_FILE=${OUTPUT_DIR}/${QUERY_ID}_frags
    FRAG_IDS_FILE=${OUTPUT_DIR}/${QUERY_ID}_frag_ids
    
   -mysql "${MYSQL_CMD_ARGS[@]}" -e "${SHOW_QUERY_PROFILE} '/${QUERY_ID}'" | 
sed 's/\\n/\n/g' > "${PLAN_GRAPH_FILE}"
   +mysql "${MYSQL_CMD_ARGS[@]}" -e "${SHOW_QUERY_PROFILE} '/${QUERY_ID}'" | 
sed 's/\\n/\n/g' >"${PLAN_GRAPH_FILE}"
    
   -grep "Fragment: " "${PLAN_GRAPH_FILE}" | sort | uniq > "${FRAGS_FILE}"
   -sed 's/Fragment: \{1,\}\([0-9]\{1,\}\)/\n\1\n/g' "${PLAN_GRAPH_FILE}" | 
grep -E  "^[0-9]{1,}$" | sort | uniq > "${FRAG_IDS_FILE}"
   +grep "Fragment: " "${PLAN_GRAPH_FILE}" | sort | uniq >"${FRAGS_FILE}"
   +sed 's/Fragment: \{1,\}\([0-9]\{1,\}\)/\n\1\n/g' "${PLAN_GRAPH_FILE}" | 
grep -E "^[0-9]{1,}$" | sort | uniq >"${FRAG_IDS_FILE}"
    
   -
    # frag inst ids
   -while read -r frag_id
   -do
   +while read -r frag_id; do
        sql="${SHOW_QUERY_PROFILE} '/${QUERY_ID}/${frag_id}'"
        frag_inst_ids_outfile="${OUTPUT_DIR}/frag_${frag_id}_instances"
   -    
   +
        echo "sql: ${sql}"
   -    mysql "${MYSQL_CMD_ARGS[@]}" -e "${sql}" | sed -n '2,$p' > 
"${frag_inst_ids_outfile}"
   -    while read -r line
   -    do
   +    mysql "${MYSQL_CMD_ARGS[@]}" -e "${sql}" | sed -n '2,$p' 
>"${frag_inst_ids_outfile}"
   +    while read -r line; do
            frag_inst_id=$(echo "${line}" | cut -f1)
            frag_inst_profile="${OUTPUT_DIR}/frag_${frag_id}_${frag_inst_id}"
            sql="${SHOW_QUERY_PROFILE} 
'/${QUERY_ID}/${frag_id}/${frag_inst_id}'"
   -        mysql "${MYSQL_CMD_ARGS[@]}" -e "${sql}" | sed 's/\\n/\n/g' > 
"${frag_inst_profile}"
   -    done < "${frag_inst_ids_outfile}"
   -done < "${FRAG_IDS_FILE}"
   +        mysql "${MYSQL_CMD_ARGS[@]}" -e "${sql}" | sed 's/\\n/\n/g' 
>"${frag_inst_profile}"
   +    done <"${frag_inst_ids_outfile}"
   +done <"${FRAG_IDS_FILE}"
   ----------
   
   You can reformat the above files to meet shfmt's requirements by typing:
   
     shfmt  -w filename
   
   
   ```
   </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: [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