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

Occurr java.lang.ArithmeticException: / by zero at hplsql component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • hpl/sql
    • None

    Description

      When I execute the copyToTable method in hplsql, the following exception occurs:

      java.lang.ArithmeticException: / by zero
      at org.apache.hive.hplsql.Copy.copyToTable(Copy.java:170)
      at org.apache.hive.hplsql.Copy.run(Copy.java:93)
      at org.apache.hive.hplsql.Exec.visitCopy_stmt(Exec.java:1284)
      at org.apache.hive.hplsql.Exec.visitCopy_stmt(Exec.java:52)
      at org.apache.hive.hplsql.HplsqlParser$Copy_stmtContext.accept(HplsqlParser.java:12148)
      at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
      at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:994)
      at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52)
      at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(HplsqlParser.java:1012)
      at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
      at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBaseVisitor.java:28)
      at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(HplsqlParser.java:446)
      at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
      at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:901)
      at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:52)
      at org.apache.hive.hplsql.HplsqlParser$ProgramContext.accept(HplsqlParser.java:389)
      at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42)
      at org.apache.hive.hplsql.Exec.run(Exec.java:760)
      at org.apache.hive.hplsql.Exec.run(Exec.java:736)
      at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

      View source code:

      if (info)

      { info(ctx, "COPY completed: " + rows + " row(s), " + timer.format() + ", " + rows/(elapsed/1000) + " rows/sec"); }

      When elapsed less than one thousand will cause the divisor to be zero

      Attachments

        1. HIVE-17554.1.patch
          0.7 kB
          ZhangBing Lin
        2. HIVE-17554.2.patch
          1 kB
          ZhangBing Lin

        Activity

          People

            linzhangbing ZhangBing Lin
            linzhangbing ZhangBing Lin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: