Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
vinlee19 committed Nov 8, 2024
1 parent ba4d29a commit c6a037f
Showing 1 changed file with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,38 +571,6 @@ public LogicalPlanBuilder(Map<Integer, ParserRuleContext> selectHintMap) {
this.selectHintMap = selectHintMap;
}

private static LogicalPlan logicalPlanCombiner(LogicalPlan left, LogicalPlan right, Qualifier qualifier) {
return new LogicalUnion(qualifier, ImmutableList.of(left, right));
}

/**
* construct avl union tree
*/
public static LogicalPlan reduceToLogicalPlanTree(int low, int high,
List<LogicalPlan> logicalPlans, Qualifier qualifier) {
switch (high - low) {
case 0:
return logicalPlans.get(low);
case 1:
return logicalPlanCombiner(logicalPlans.get(low), logicalPlans.get(high), qualifier);
default:
int mid = low + (high - low) / 2;
return logicalPlanCombiner(
reduceToLogicalPlanTree(low, mid, logicalPlans, qualifier),
reduceToLogicalPlanTree(mid + 1, high, logicalPlans, qualifier),
qualifier
);
}
}

public static String stripQuotes(String str) {
if ((str.charAt(0) == '\'' && str.charAt(str.length() - 1) == '\'')
|| (str.charAt(0) == '\"' && str.charAt(str.length() - 1) == '\"')) {
str = str.substring(1, str.length() - 1);
}
return str;
}

@SuppressWarnings("unchecked")
protected <T> T typedVisit(ParseTree ctx) {
return (T) ctx.accept(this);
Expand Down

0 comments on commit c6a037f

Please sign in to comment.