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

Switch to disable query sub-expansion #2380

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ trait SqlIdiom extends Idiom {
// for more details.
// Right now we are not removing extra select clauses here (via RemoveUnusedSelects) since I am not sure what
// kind of impact that could have on selects. Can try to do that in the future.
RemoveExtraAlias(strategy)(ExpandNestedQueries(SqlQuery(a))).token
if (Messages.querySubexpand)
RemoveExtraAlias(strategy)(ExpandNestedQueries(SqlQuery(a))).token
else
SqlQuery(a).token

case a: Operation => a.token
case a: Infix => a.token
case a: Action => a.token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ object Messages {
def traceAstSimple = cache("quill.trace.ast.simple", variable("quill.trace.ast.simple", "quill_trace_ast_simple", "false").toBoolean)
def traceQuats = cache("quill.trace.quat", QuatTrace(variable("quill.trace.quat", "quill_trace_quat", QuatTrace.None.value)))
def cacheDynamicQueries = cache("quill.query.cacheDaynamic", variable("quill.query.cacheDaynamic", "query_query_cacheDaynamic", "true").toBoolean)
def querySubexpand = cache("quill.query.subexpand", variable("quill.query.subexpand", "query_query_subexpand", "true").toBoolean)
def quillLogFile = cache("quill.log.file", LogToFile(variable("quill.log.file", "quill_log_file", "false")))

sealed trait LogToFile
Expand Down