Skip to content

PostgreSQL: GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY and GENERATED ALWAYS AS ( generation_expr ) support#832

Merged
alamb merged 2 commits into
apache:mainfrom
samjay000:generated_as_identity_column_type
Mar 16, 2023
Merged

PostgreSQL: GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY and GENERATED ALWAYS AS ( generation_expr ) support#832
alamb merged 2 commits into
apache:mainfrom
samjay000:generated_as_identity_column_type

Conversation

@samjay000

Copy link
Copy Markdown
Contributor

Support for ColumnDef -> ColumnOptions

GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
GENERATED ALWAYS AS ( generation_expr ) STORED

Test cases are available at sqlparser_postgres.rs

and several clippy issues were fixed.
https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

This is continuation of #681

…_options ) and GENERATED ALWAYS AS ( generation_expr ) STORED implementation.
@samjay000 samjay000 marked this pull request as ready for review March 9, 2023 20:24
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 4378470005

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 373 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.007%) to 86.125%

Files with Coverage Reduction New Missed Lines %
src/dialect/hive.rs 1 92.86%
tests/sqlparser_postgres.rs 35 97.46%
src/ast/ddl.rs 39 82.72%
src/parser.rs 298 82.92%
Totals Coverage Status
Change from base Build 4374743456: -0.007%
Covered Lines: 13575
Relevant Lines: 15762

💛 - Coveralls

@alamb alamb 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.

Thank you @Sam-mmm -- looks good to me

@alamb alamb merged commit a8a8e65 into apache:main Mar 16, 2023
@alamb alamb mentioned this pull request Mar 18, 2023
mobuchowski pushed a commit to OpenLineage/sqlparser-rs that referenced this pull request Aug 7, 2023
…ED ALWAYS AS ( generation_expr ) support (apache#832)

* GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) basic impl - test are failing.

* PostgreSQL GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) and GENERATED ALWAYS AS ( generation_expr ) STORED implementation.
Sign up for free to 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.

3 participants