Skip to content

Conversation

@TimCoder
Copy link

Proposed changes

Update tpcds tools:

Fix the escape character '' error in sql generated by tpcds tools scripts gen-tpcds-queries.sh

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
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 tools/tpcds-tools/bin/gen-tpcds-queries.sh line 151:
            q="${q//${origin}/concat(concat('${smc1}', ','), '${smc2}')}" && echo "${q};" >>"${of}"
                                            ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
                                                             ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.

For more information:
  https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
----------

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 ' found no issues.

@TimCoder
Copy link
Author

run buildall

@TimCoder
Copy link
Author

TimCoder commented Oct 10, 2023

BD5462BC415ED34ACB90BE7C70DFB351
when execute the query generated by gen-tpcds-queries.sh, the query with "\" failed. @englefly

@morrySnow
Copy link
Contributor

could u add a example to explain the behavior before and after this PR, thanks.

@TimCoder
Copy link
Author

TimCoder commented Nov 9, 2023

1699498741737
it seems different linux shell handle with '' results different sql. the sql with '' in left linux, doris ran will return error. @morrySnow

@hello-stephen
Copy link
Contributor

这可能是系统兼容性原因吧,在我环境上ok

@TimCoder
Copy link
Author

TimCoder commented Nov 9, 2023

这可能是系统兼容性原因吧,在我环境上ok

按这个commit中的代码修改后,是可以解决兼容性问题的,这个PR麻烦处理一下。

@adonis0147 adonis0147 force-pushed the branch-tpcds-scripts-fix branch from 748c27b to 6e6677e Compare November 13, 2023 02:27
@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 tools/tpcds-tools/bin/gen-tpcds-queries.sh line 151:
            q="${q//${origin}/concat(concat('${smc1}', ','), '${smc2}')}" && echo "${q};" >>"${of}"
                                            ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
                                                             ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.

For more information:
  https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
----------

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 ' found no issues.

@adonis0147
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 tools/tpcds-tools/bin/gen-tpcds-queries.sh line 151:
            q="${q//${origin}/concat(concat('${smc1}', ','), '${smc2}')}" && echo "${q};" >>"${of}"
                                            ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
                                                             ^-------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.

For more information:
  https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
----------

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 ' found no issues.

Hi @TimCoder , you should fix the errors reported by the workflow.

By the way, did you run the script by sh (e.g. sh gen-tpcds-queries.sh) ?

@github-actions
Copy link
Contributor

We're closing this PR because it hasn't been updated in a while.
This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!

@github-actions github-actions bot added the Stale label May 12, 2024
@github-actions github-actions bot closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants