Skip to content

Support TRIM from with optional expr and FROM expr - #573

Merged
alamb merged 5 commits into
apache:mainfrom
ayushdg:bug-trim-expr
Aug 15, 2022
Merged

Support TRIM from with optional expr and FROM expr#573
alamb merged 5 commits into
apache:mainfrom
ayushdg:bug-trim-expr

Conversation

@ayushdg

@ayushdgayushdg commented Aug 12, 2022

Copy link
Copy Markdown
Contributor

Fixes#568
The objective of this pr is to allow specifying the chars from expr syntax for the trim expression even without specifying a trim where flag.

  • Update trim expr members, not tying the trimWhere option to the trim_what option
  • Update parsing logic to handle cases with no trim flag but trim_char
  • Add tests

@coveralls

coveralls commented Aug 12, 2022

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2863233291

  • 20 of 22(90.91%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 85.433%

Changes Missing CoverageCovered LinesChanged/Added Lines%
src/ast/mod.rs7977.78%
Files with Coverage ReductionNew Missed Lines%
src/parser.rs183.25%
TotalsCoverage Status
Change from base Build 2848542264:-0.01%
Covered Lines:9507
Relevant Lines:11128

💛 - Coveralls

@ayushdg
ayushdg marked this pull request as ready for review August 15, 2022 20:18
@alambalamb changed the title Update trim Expr to allow parsing chars from string without a where flagSupport TRIM from string without a where clauseAug 15, 2022

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me -- thanks @ayushdg

@alambalamb changed the title Support TRIM from string without a where clauseSupport TRIM from with optional FROM clauseAug 15, 2022
@alambalamb changed the title Support TRIM from with optional FROM clauseSupport TRIM from with optional expr and FROM exprAug 15, 2022
@alamb
alamb merged commit 42c5d43 into apache:mainAug 15, 2022
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2863233291

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 20 of 22(90.91%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 85.433%

Changes Missing CoverageCovered LinesChanged/Added Lines%
src/ast/mod.rs7977.78%
Files with Coverage ReductionNew Missed Lines%
src/parser.rs183.25%
TotalsCoverage Status
Change from base Build 2848542264:-0.01%
Covered Lines:9507
Relevant Lines:11128

💛 - Coveralls

@coveralls

coveralls commented Oct 19, 2024

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2849247119

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 25 of 27(92.59%) changed or added relevant lines in 3 files are covered.
  • 530 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 85.424%

Changes Missing CoverageCovered LinesChanged/Added Lines%
src/ast/mod.rs7977.78%
Files with Coverage ReductionNew Missed Lines%
tests/sqlparser_common.rs1997.1%
src/ast/mod.rs15577.89%
src/parser.rs35683.23%
TotalsCoverage Status
Change from base Build 2848542264:-0.02%
Covered Lines:9512
Relevant Lines:11135

💛 - Coveralls

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trim syntax without trimWhere and From not supported.

3 participants

@ayushdg@coveralls@alamb