-
Notifications
You must be signed in to change notification settings - Fork 14
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
Schema Engine Revamp #135
Merged
Merged
Schema Engine Revamp #135
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LGTM 😎 |
Ideally schema should be generated once but imported for all queries, but this would break backward compatbility. So will it as improvement in next major version.
tabdulradi
force-pushed
the
feature/schema-engine-revamp
branch
from
January 1, 2017 21:31
1cde948
to
b2c738f
Compare
Adjusts implicit instances, and utilises macros, so that a special implicit instance would resolve if a non existing column was selected. This special implicit is implemented via macro, to show a compile error.
Using macro WeakTypeTag, we extract the column name (from the literal type), then show it as part of compiler error message
Merging anyway, master shall be broken temporarily until we migrate to the new implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current implementation of Schema engine is not flexible enough to support UDTs, UDFs, and UDAs without too much hassle. The main reason is all Cassandra relation logic is implemented as a normal run-time-style code, that gets executed via macros in compile-time! This made extending and configuring troy very hard task.
This PR aims to demolish the current schema engine, splitting it into two parts
After the macros are executed, we should have in place queries written in an internal-dsl (designed as part of this PR), that expected specific implicits to be imported somewhere, those implicits are effectively the schema plus cassandra built-ins.
The approach I took, makes heavy use of literal types (so we moved to type-level compiler till the feature is merged into the Lightbend Scala), typeclasses, and HLists.