-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make ThunkFactory generic #587
Conversation
…CompilerPipeline and future PlannerPipeline
57641ab
to
afce4bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to ThunkFactory
and its uses seem reasonable to me. Left some minor comments related to documentation that needs updated due to this change.
@@ -28,8 +28,10 @@ import org.partiql.lang.errors.Property | |||
* See https://en.wikipedia.org/wiki/Thunk | |||
* | |||
* This name was chosen because it is a thunk that accepts an instance of `Environment`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment may need updated since Environment
was made generic. Similarly on L41.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I can probably just delete these lines--I don't think they added much.
@@ -43,10 +44,11 @@ import org.partiql.lang.errors.UNKNOWN | |||
open class SqlException( | |||
override var message: String, | |||
val errorCode: ErrorCode, | |||
val errorContext: PropertyValueMap? = null, | |||
errorContextArg: PropertyValueMap? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kdoc for this parameter needs to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes since last commit look good other than the one comment in EvaluatingCompilerOffsetTests.kt.
tc.copy(excludeLegacySerializerAssertions = true), | ||
tc.copy( | ||
excludeLegacySerializerAssertions = true, | ||
targetPipeline = EvaluatorTestTarget.COMPILER_PIPELINE, // planner & phys. alg. have no support for OFFSET (yet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From your comment in the PR that set the test exclusions, #586, you left a comment saying that this comment was wrong. Perhaps there was some missed commit in the merge?
(The original version was just tc.copy(excludeLegacySerializerAssertions = true)
and the exclusions were set by the individual EvaluatorTestCase
s.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, it must have returned after a merge. Will fix. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merges the following PRs to `main`: - #583 - #584 - #587 - #588 - #589 - #609 - #590 - #592 Also, this adds a TODO comment (ea40e4a, requested by @am357 in offline chat) and excludes `PlannerPipeline` from the new aggregate tests which were pulled in when merging from `main` and were not part of the other PRs (34025b3). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Merges the following PRs to `main`: - #583 - #584 - #587 - #588 - #589 - #609 - #590 - #592 Also, this adds a TODO comment (ea40e4a, requested by @am357 in offline chat) and excludes `PlannerPipeline` from the new aggregate tests which were pulled in when merging from `main` and were not part of the other PRs (34025b3). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Merges the following PRs to `main`: - #583 - #584 - #587 - #588 - #589 - #609 - #590 - #592 Also, this adds a TODO comment (ea40e4a, requested by @am357 in offline chat) and excludes `PlannerPipeline` from the new aggregate tests which were pulled in when merging from `main` and were not part of the other PRs (34025b3). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Merges the following PRs to `main`: - #583 - #584 - #587 - #588 - #589 - #609 - #590 - #592 Also, this adds a TODO comment (ea40e4a, requested by @am357 in offline chat) and excludes `PlannerPipeline` from the new aggregate tests which were pulled in when merging from `main` and were not part of the other PRs (34025b3). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Originally part of #582, this PR is based on #584 (which must be merged first).
The legacy AST evaluator's
ThunkFactory
and related types were tightly coupled to theorg.partiql.lang.eval.Environment
class. However, the new plan evaluator replaces this class with a different one. This PR makesThunkFactory
and related types generic so that a different environment class may be used with the physical plan evaluator without having to duplicateThunkFactory
et al.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.