Skip to content

Commit

Permalink
refine DerviedColumn method which is dependent on the core path of qu…
Browse files Browse the repository at this point in the history
…ery (#3268)
  • Loading branch information
gufengwyx8 authored and terrymanu committed Oct 15, 2019
1 parent f658f37 commit b849400
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public enum DerivedColumn {
ORDER_BY_ALIAS("ORDER_BY_DERIVED_"),
GROUP_BY_ALIAS("GROUP_BY_DERIVED_"),
AGGREGATION_DISTINCT_DERIVED("AGGREGATION_DISTINCT_DERIVED_");


private static final Collection<DerivedColumn> VALUES_WITHOUT_AGGREGATION_DISTINCT_DERIVED = getValues();

private final String pattern;

/**
Expand Down Expand Up @@ -72,7 +74,7 @@ public static boolean isDerivedColumnName(final String columnName) {
* @return is derived column or not
*/
public static boolean isDerivedColumn(final String columnName) {
for (DerivedColumn each : DerivedColumn.getValues()) {
for (DerivedColumn each : VALUES_WITHOUT_AGGREGATION_DISTINCT_DERIVED) {
if (columnName.startsWith(each.pattern)) {
return true;
}
Expand Down

0 comments on commit b849400

Please sign in to comment.