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

Parenthesis balance rule #6

Open
vlsi opened this issue Dec 4, 2019 · 0 comments
Open

Parenthesis balance rule #6

vlsi opened this issue Dec 4, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@vlsi
Copy link
Member

vlsi commented Dec 4, 2019

Samples of undesired code:

    if (!(group.isRows || (group.upperBound.isUnbounded()
        && group.lowerBound.isUnbounded()))) {
    builder.addRuleCollection(ImmutableList.of((RelOptRule) SubQueryRemoveRule.FILTER,
        SubQueryRemoveRule.PROJECT,
        SubQueryRemoveRule.JOIN));
      if (((nlsString.getCharset() != null
          && type.getCharset().equals(nlsString.getCharset()))
          || (nlsString.getCharset() == null
          && SqlCollation.IMPLICIT.getCharset().equals(type.getCharset())))
          && nlsString.getCollation().equals(type.getCollation())
          && ((NlsString) value).getValue().length() == type.getPrecision()) {
        includeType = RexDigestIncludeType.NO_TYPE;
      } else {
        includeType = RexDigestIncludeType.ALWAYS;
      }
    if ((leftRowCount != null)
        && (rightRowCount != null)
        && ((leftRowCount < rightRowCount)
        || ((Math.abs(leftRowCount - rightRowCount)
        < RelOptUtil.EPSILON)
        && (rowWidthCost(left.getJoinTree())
        < rowWidthCost(right.getJoinTree()))))) {
      swap = true;
    }
        literals.add((RexLiteral) rexBuilder.makeLiteral(
            BigDecimal.ZERO, aggregateCall.getType(), false));
    Object expr4 =
        gt(
            qw(42, 43), eq(gt(x,
                y), 2));

    Object expr = gt(eq(x, 2+(3)
      ), 5);

    Object expr2 = "(" + gt(eq(x, (3)+2
      ), 6);

    Object expr3 =
        gt(
            qw(), eq(gt(x,
                y), 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant