Skip to content

Commit

Permalink
refactor!: separate expressions from execution plans && renames (#124)
Browse files Browse the repository at this point in the history
# Rationale for this change
As the amount of expressions and execution plans increase we need to
seriously differentiate between the two. This PR is the first in a
series of PRs that will lead to `SliceExec` and `UnionExec`.
 
<!--
Why are you proposing this change? If this is already explained clearly
in the linked Jira ticket then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->

# What changes are included in this PR?
- rename `ProvableExpr` to `ProofExpr`
- rename `ProvableExprPlan` to `DynProofExpr`
- rename `AliasedProvableExprPlan` to `AliasedDynProofExpr`
- rename `ProvableExprPlanBuilder` to `DynProofExprBuilder`
- rename `ProofPlan` to `DynProofPlan`
- rename `ProofExecutionPlan` to `ProofPlan`
- move all `ProofExpr`s to `sql::proof_exprs`
- move all `ProofPlan`s to `sql::proof_plans`
- fix `Cargo.toml` warning in new Rust
 
<!--
There is no need to duplicate the description in the ticket here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

# Are these changes tested?
Existing tests should pass
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
  • Loading branch information
iajoiner authored Sep 3, 2024
1 parent 11aff07 commit c33f4b7
Show file tree
Hide file tree
Showing 70 changed files with 1,036 additions and 1,084 deletions.
2 changes: 1 addition & 1 deletion crates/proof-of-sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ thiserror = { workspace = true }
tracing = { workspace = true, features = ["attributes"] }
zerocopy = { workspace = true }

[dev_dependencies]
[dev-dependencies]
alloy-primitives = { workspace = true }
alloy-sol-types = { workspace = true }
arrow-csv = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/proof-of-sql/src/base/database/accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub trait DataAccessor<S: Scalar>: MetadataAccessor {
///
/// This accessor should be implemented by both the prover and verifier
/// and then used by the Proof of SQL code to convert an IntermediateAst
/// into a ProofExecutionPlan.
/// into a ProofPlan.
pub trait SchemaAccessor {
/// Lookup the column's data type in the specified table
///
Expand Down
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/base/proof/transcript_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub enum MessageLabel {
/// Represents challenges posted after result computation.
PostResultChallenges,
/// Represents a SQL query
ProofExecutionPlan,
ProofPlan,
/// Represents the length of a table.
TableLength,
/// Represents an offset for a generator.
Expand Down Expand Up @@ -179,7 +179,7 @@ impl MessageLabel {
MessageLabel::DoryMessage => b"dorymessage v1",
MessageLabel::DoryChallenge => b"dorychallenge v1",
MessageLabel::PostResultChallenges => b"postresultchallenges v1",
MessageLabel::ProofExecutionPlan => b"proofexec v1",
MessageLabel::ProofPlan => b"proofplan v1",
MessageLabel::TableLength => b"tablelength v1",
MessageLabel::GeneratorOffset => b"generatoroffset v1",
}
Expand Down
360 changes: 0 additions & 360 deletions crates/proof-of-sql/src/sql/ast/provable_expr_plan.rs

This file was deleted.

Loading

0 comments on commit c33f4b7

Please sign in to comment.