Last active
September 18, 2021 10:45
-
-
Save prateeka/a2621bd82d4eeeaf616a2fb7bc7c0fbb to your computer and use it in GitHub Desktop.
atscale-4654: missing group-by clause in outbound query. reason for missing the group-by clause for the ticket are listed here compared to other cases which have group-by clause
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
def makeSelectColumn(gb: GroupByType): Option[SelectColumn] = { | |
gb match { | |
case GroupByIgnore => None | |
case _: GroupByColumnNumber => None | |
case gbv@GroupByValue(_: ConstantValue, _) if findGroupByTypeColumn(gbv).isEmpty => None | |
case _ => | |
val (exposed, expr) = | |
gb match { | |
case GroupByColumnName(name, _, Some(expression)) => (Some(name), expression) | |
case GroupByValue(_, expression) => (None, expression) | |
case _ => throw new IllegalStateException("") | |
} | |
val (sc, gbo) = getSelectColumn(exposed, expr, None, gbl) | |
Some(sc.copy(aggType = new AggregateGrouped(false))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
query-1 inbound query:
query-1 outbound query:
query-2 inbound query:
query-2 outbound query: