Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3237

ExpressionWriter not updating indent correctly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      ExpressionWriter does not seem to be updating the indent correctly as I have ran into errors like this

       

      java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
      
      	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
      	at java.util.ArrayList.get(ArrayList.java:433)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.begin(ExpressionWriter.java:78)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.begin(ExpressionWriter.java:101)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:161)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:60)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:84)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ConditionalStatement.accept0(ConditionalStatement.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodDeclaration.accept(MethodDeclaration.java:73)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:167)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:84)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodDeclaration.accept(MethodDeclaration.java:73)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:167)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:84)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ConditionalStatement.accept0(ConditionalStatement.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodDeclaration.accept(MethodDeclaration.java:73)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:167)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:84)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodDeclaration.accept(MethodDeclaration.java:73)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:167)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:84)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ConditionalStatement.accept0(ConditionalStatement.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.append(ExpressionWriter.java:129)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodDeclaration.accept(MethodDeclaration.java:73)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.ExpressionWriter.list(ExpressionWriter.java:167)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.NewExpression.accept(NewExpression.java:62)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:61)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodCallExpression.accept(MethodCallExpression.java:105)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.UnaryExpression.accept(UnaryExpression.java:49)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodCallExpression.accept(MethodCallExpression.java:105)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodCallExpression.accept(MethodCallExpression.java:94)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.MethodCallExpression.accept(MethodCallExpression.java:105)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.GotoStatement.accept0(GotoStatement.java:80)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.BlockStatement.accept0(BlockStatement.java:75)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.Statement.accept(Statement.java:32)
      	at org.apache.beam.repackaged.sql.org.apache.calcite.linq4j.tree.AbstractNode.toString(AbstractNode.java:51)

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            julianhyde Julian Hyde
            snallapa Sahith Nallapareddy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                Slack

                  Issue deployment