Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15956

StackOverflowError when drop lots of partitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0, 2.2.0
    • 4.0.0-alpha-1
    • Metastore
    • None

    Description

      Repro steps:
      1. Create partitioned table and add 10000 partitions

      create table test_partition(id int) partitioned by (dt int);
      
      alter table test_partition add partition(dt=1);
      alter table test_partition add partition(dt=3);
      alter table test_partition add partition(dt=4);
      ...
      alter table test_partition add partition(dt=10000);
      

      2. Drop 9000 partitions:

      alter table test_partition drop partition(dt<9000);
      

      Step 2 will fail with StackOverflowError:

      Exception in thread "pool-7-thread-161" java.lang.StackOverflowError
          at org.datanucleus.query.expression.ExpressionCompiler.isOperator(ExpressionCompiler.java:819)
          at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:190)
          at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
          at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:192)
          at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
          at org.datanucleus.query.expression.ExpressionCompiler.compileOrAndExpression(ExpressionCompiler.java:192)
          at org.datanucleus.query.expression.ExpressionCompiler.compileExpression(ExpressionCompiler.java:179)
      
      Exception in thread "pool-7-thread-198" java.lang.StackOverflowError
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:83)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
          at org.datanucleus.query.expression.DyadicExpression.bind(DyadicExpression.java:87)
      

      Attachments

        1. HIVE-15956.patch
          3 kB
          Niklaus Xiao
        2. HIVE-15956.2.patch
          5 kB
          Denys Kuzmenko
        3. HIVE-15956.3.patch
          5 kB
          Denys Kuzmenko

        Activity

          People

            dkuzmenko Denys Kuzmenko
            niklaus.xiao Niklaus Xiao
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: