englefly commented on code in PR #36193:
URL: https://github.com/apache/doris/pull/36193#discussion_r1637404929
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java:
##########
@@ -87,81 +87,83 @@ public LeadingHint(String hintName) {
public LeadingHint(String hintName, List<String> parameters, String
originalString) {
super(hintName);
this.originalString = originalString;
- this.parameters = parameters;
- int level = 0;
- Stack<Boolean> brace = new Stack<>();
- String lastParameter = "";
- for (String parameter : parameters) {
- if (parameter.equals("{")) {
- if (lastParameter.equals("}")) {
- level += 2;
- brace.push(true);
- } else {
- ++level;
- brace.push(false);
- }
- } else if (parameter.equals("}")) {
- if (brace.pop().equals(true)) {
- level -= 2;
- } else {
- level--;
- }
- } else if (parameter.equals("shuffle")) {
- DistributeHint distributeHint = new
DistributeHint(DistributeType.SHUFFLE_RIGHT);
- distributeHints.put(tablelist.size(), distributeHint);
- if
(!ConnectContext.get().getStatementContext().getHints().contains(distributeHint))
{
-
ConnectContext.get().getStatementContext().addHint(distributeHint);
- }
- } else if (parameter.equals("broadcast")) {
- DistributeHint distributeHint = new
DistributeHint(DistributeType.BROADCAST_RIGHT);
- distributeHints.put(tablelist.size(), distributeHint);
- if
(!ConnectContext.get().getStatementContext().getHints().contains(distributeHint))
{
-
ConnectContext.get().getStatementContext().addHint(distributeHint);
- }
+ addJoinParameters = insertJoinIntoParameters(parameters);
+ normalizedParameters = parseIntoPolandNotation(addJoinParameters);
Review Comment:
Reverse Polish Notation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]