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

SQLParser supports alter, truncate and drop statements #1695

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

pawel-big-lebowski
Copy link
Contributor

@pawel-big-lebowski pawel-big-lebowski commented Mar 6, 2023

Problem

SqlParser does not support alter, truncate and drop statements.

Closes: #1695, #1675, #1677

Solution

  • Implement support for alter table swap with within sqlparser-rs.
  • Extend statement visitor to fetch input / output datasets.

Note: All schema changes require discussion. Please link the issue for context.

  • Your change modifies the core OpenLineage model
  • Your change modifies one or more OpenLineage facets

If you're contributing a new integration, please specify the scope of the integration and how/where it has been tested (e.g., Apache Spark integration supports S3 and GCS filesystem operations, tested with AWS EMR).

Checklist

  • You've signed-off your work
  • Your pull request title follows our guidelines
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • Your comment includes a one-liner for the changelog about the specific purpose of the change (if necessary)
  • You've versioned the core OpenLineage model or facets according to SchemaVer (if relevant)
  • You've added a header to source files (if relevant)

SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the OpenLineage project

@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2023

Codecov Report

Merging #1695 (b98183f) into main (3e07133) will increase coverage by 1.11%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #1695      +/-   ##
============================================
+ Coverage     83.34%   84.46%   +1.11%     
============================================
  Files            89       64      -25     
  Lines          4006     3502     -504     
  Branches         29        0      -29     
============================================
- Hits           3339     2958     -381     
+ Misses          635      544      -91     
+ Partials         32        0      -32     
Impacted Files Coverage Δ
.../openlineage/client/transports/KafkaTransport.java
...ntegration/dagster/openlineage/dagster/__init__.py
...io/openlineage/client/transports/FacetsConfig.java
.../io/openlineage/client/transports/KafkaConfig.java
...c/main/java/io/openlineage/client/Environment.java
...penlineage/client/transports/TransportFactory.java
.../openlineage/client/DefaultConfigPathProvider.java
...penlineage/client/transports/KinesisTransport.java
integration/dagster/openlineage/dagster/cursor.py
...in/java/io/openlineage/client/OpenLineageYaml.java
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pawel-big-lebowski pawel-big-lebowski changed the title SQLParser supports alter statements SQLParser supports alter, truncate and drop statements Mar 7, 2023
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
@pawel-big-lebowski pawel-big-lebowski marked this pull request as ready for review March 7, 2023 12:40
@mobuchowski mobuchowski self-requested a review March 7, 2023 12:46
@pawel-big-lebowski pawel-big-lebowski merged commit 8f38c4c into main Mar 7, 2023
@pawel-big-lebowski pawel-big-lebowski deleted the snowflake/alter-table-swap-with branch March 7, 2023 13:19
harels pushed a commit to harels/OpenLineage that referenced this pull request May 11, 2023
)

Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants