Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2609

convert_from should throw an appropriate error when an invalid data type is used as the second argument

    XMLWordPrintableJSON

    Details

      Description

      git.commit.id.abbrev=4d398ed

      The below query fails with an assertion error. It would be nice if it returns a proper error message indicating that the datatype used is invalid

      0: jdbc:drill:schema=dfs.hbase> select convert_from(a.types.int_col, 'abc') from hbase.fewtypes_null a;
      Query failed: AssertionError:
      

      Below is the error from the logs :

      org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment initialization: null
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:211) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
      Caused by: java.lang.AssertionError: null
      	at org.apache.drill.exec.planner.logical.PreProcessLogicalRel.visit(PreProcessLogicalRel.java:117) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.eigenbase.rel.ProjectRel.accept(ProjectRel.java:106) ~[optiq-core-0.9-drill-r20.jar:na]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.preprocessNode(DefaultSqlHandler.java:195) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:135) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:735) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:202) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	... 4 common frames omitted
      2015-03-27 13:29:13,363 [2aea4265-bbbb-54b2-ef91-32544876cad1:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - foreman cleaning up - status: []
      2015-03-27 13:29:13,364 [2aea4265-bbbb-54b2-ef91-32544876cad1:foreman] ERROR o.a.drill.exec.work.foreman.Foreman - Error 172a64eb-10b3-4df1-84d0-8a4eba97c147: AssertionError: 
      org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment initialization: null
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:211) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
      Caused by: java.lang.AssertionError: null
      	at org.apache.drill.exec.planner.logical.PreProcessLogicalRel.visit(PreProcessLogicalRel.java:117) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.eigenbase.rel.ProjectRel.accept(ProjectRel.java:106) ~[optiq-core-0.9-drill-r20.jar:na]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.preprocessNode(DefaultSqlHandler.java:195) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:135) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:735) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:202) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
      	... 4 common frames omitted
      

      Let me know if you need anything else.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rkins Rahul Kumar Challapalli
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: