Skip to content

Commit

Permalink
Internalizes the IR used by PlanTyper (#1270)
Browse files Browse the repository at this point in the history
* Makes unresolved plan internal

* Ktlint, include error nodes, fix tests

* Addresses PR comments
  • Loading branch information
rchowell authored Nov 29, 2023
1 parent 63f8b72 commit c23ca8c
Show file tree
Hide file tree
Showing 28 changed files with 4,623 additions and 2,566 deletions.
2,013 changes: 0 additions & 2,013 deletions partiql-plan/README.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion partiql-plan/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ val generate = tasks.register<Exec>("generate") {
"--poems", "builder",
"--poems", "util",
"--opt-in", "org.partiql.value.PartiQLValueExperimental",
"./src/main/resources/partiql_plan_0_1.ion"
"./src/main/resources/partiql_plan.ion"
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@ imports::{
}

parti_q_l_plan::{
version: parti_q_l_version, // version :: (major minor)
globals: list::[global], // (globals ...)
statement: statement, // (statement ...)
}

parti_q_l_version::[
VERSION_0_0,
VERSION_0_1, // CURRENT
]

// Globals

global::{
Expand All @@ -28,26 +22,17 @@ global::{
// Functions

fn::[
resolved::{
static::{
signature: scalar_signature,
},
unresolved::{
identifier: identifier,
isHidden: bool,
},
dynamic::{
signatures: list::[scalar_signature],
}
]

agg::[
resolved::{
signature: aggregation_signature,
},
unresolved::{
identifier: identifier,
},
]
agg::{
signature: aggregation_signature,
}

// Statements

Expand Down Expand Up @@ -85,21 +70,9 @@ rex::{
value: partiql_value,
},

var::[
resolved::{
ref: int,
},
unresolved::{
identifier: identifier,
scope: scope,
},
_::[
scope::[
DEFAULT, // x.y.z
LOCAL, // @x.y.z
],
],
],
var::{
ref: int,
},

global::{
ref: int,
Expand Down Expand Up @@ -133,15 +106,9 @@ rex::{
args: list::[rex],
candidates: list::[candidate],
_: [

// Represents a viable candidate.
//
// fn: The resolved function
// coercions: Represents the coercion that should take place -- if not null. The first item is to be wrapped
// over the first argument of dynamic.args and so on.
candidate::{
fn: '.fn.resolved',
coercions: list::[optional::'.fn.resolved']
fn: fn,
coercions: list::[optional::fn]
}
]
}
Expand Down
266 changes: 0 additions & 266 deletions partiql-plan/src/main/resources/partiql_plan_0_0.ion

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.partiql.planner

import org.partiql.planner.typer.TypeLattice
import org.partiql.planner.internal.typer.TypeLattice
import org.partiql.types.function.FunctionParameter
import org.partiql.types.function.FunctionSignature
import org.partiql.value.PartiQLValueExperimental
Expand Down
Loading

0 comments on commit c23ca8c

Please sign in to comment.