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

Add support for create table statement in planner #1692

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yliuuuu
Copy link
Contributor

@yliuuuu yliuuuu commented Dec 26, 2024

Relevant Issues

  • [Closes/Related To] Issue #XXX

Description

  • This PR contains two major components: PShape and Create Table Planning

PShape

PShape is an implementation of PType that is for DDL Planning Usage.

PShape wraps around PType, forming a new base for operation.

PTrait extends PShape, allowing us to construct a LinkedList-alike object chain.

consider:

foo INT2 NOT NULL COMMENT 'foo is int2'

The associated type is

MetadataTrait(
     NotNullTrait(
            PShape(PType.smallint())
     ), 
    key = "comment", value = "foo is int2"
)

Create Table Planing

Instead of asking the users to detailing the steps for create table, the public plan we exposed simply ask the user to supply a SPI Table object.

For example:

 val plan = Plan { 
            Action.CreateTable { 
                Table.builder().name(...)
                    .schema(....)
                    .build()
            }
        }

Based on this idea: the various planning stage is a process to lower the associated information into PShape (which is also a PType and can be supplied into the schema() builder call without changing APIs).

Other Information

  • Updated Unreleased Section in CHANGELOG: [YES/NO]

    • No.
  • Any backward-incompatible changes? [YES/NO]

    • No. API extension.
  • Any new external dependencies? [YES/NO]

    • No.
  • Do your changes comply with the Contributing Guidelines
    and Code Style Guidelines? [YES/NO]

  • Yes.

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

github-actions bot commented Dec 26, 2024

CROSS-ENGINE-REPORT ❌

BASE (LEGACY-V0.14.8) TARGET (EVAL-1233616) +/-
% Passing 89.67% 94.32% 4.65% ✅
Passing 5287 5561 274 ✅
Failing 609 54 -555 ✅
Ignored 0 281 281 🔶
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: v0.14.8
  • Base Engine: LEGACY
  • Target Commit: 1233616
  • Target Engine: EVAL

Result Details

  • ❌ REGRESSION DETECTED. See Now Failing/Ignored Tests. ❌
  • Passing in both: 2641
  • Failing in both: 17
  • Ignored in both: 0
  • PASSING in BASE but now FAILING in TARGET: 5
  • PASSING in BASE but now IGNORED in TARGET: 108
  • FAILING in BASE but now PASSING in TARGET: 180
  • IGNORED in BASE but now PASSING in TARGET: 0

Now FAILING Tests ❌

The following 5 test(s) were previously PASSING in BASE but are now FAILING in TARGET:

Click here to see
  1. undefinedUnqualifiedVariableWithUndefinedVariableBehaviorMissing, compileOption: PERMISSIVE
  2. undefinedUnqualifiedVariableIsNullExprWithUndefinedVariableBehaviorMissing, compileOption: PERMISSIVE
  3. undefinedUnqualifiedVariableIsMissingExprWithUndefinedVariableBehaviorMissing, compileOption: PERMISSIVE
  4. inPredicateWithTableConstructor, compileOption: PERMISSIVE
  5. notInPredicateWithTableConstructor, compileOption: PERMISSIVE

Now IGNORED Tests ❌

The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

Now Passing Tests

180 test(s) were previously failing in BASE (LEGACY-V0.14.8) but now pass in TARGET (EVAL-1233616). Before merging, confirm they are intended to pass.

The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

CROSS-COMMIT-REPORT ✅

BASE (EVAL-EA779EE) TARGET (EVAL-1233616) +/-
% Passing 94.32% 94.32% 0.00% ✅
Passing 5561 5561 0 ✅
Failing 54 54 0 ✅
Ignored 281 281 0 ✅
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: ea779ee
  • Base Engine: EVAL
  • Target Commit: 1233616
  • Target Engine: EVAL

Result Details

  • Passing in both: 5561
  • Failing in both: 54
  • Ignored in both: 281
  • PASSING in BASE but now FAILING in TARGET: 0
  • PASSING in BASE but now IGNORED in TARGET: 0
  • FAILING in BASE but now PASSING in TARGET: 0
  • IGNORED in BASE but now PASSING in TARGET: 0

@yliuuuu yliuuuu marked this pull request as ready for review December 26, 2024 20:06
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.

1 participant