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

Unable to submit physical plan from Web UI on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.12.0
    • None
    • None

    Description

      Unable to submit physical plan from Web UI on Windows:

      Steps to reproduce:
      1. Generate physical plan using query:
      explain plan for SELECT * FROM cp.`employee.json` LIMIT 20

      2. Copy output in json column:

      { "head" : { "version" : 1, "generator" : { "type" : "ExplainHandler", "info" : "" }, "type" : "APACHE_DRILL_PHYSICAL", "options" : [ ], "queue" : 0, "resultMode" : "EXEC" }, "graph" : [ { "pop" : "fs-scan", "@id" : 4, "userName" : "User", "files" : [ "classpath:/employee.json" ], "storage" : { "type" : "file", "enabled" : true, "connection" : "classpath:///", "config" : null, "workspaces" : null, "formats" : { "csv" : { "type" : "text", "extensions" : [ "csv" ], "delimiter" : "," }, "tsv" : { "type" : "text", "extensions" : [ "tsv" ], "delimiter" : "\t" }, "json" : { "type" : "json", "extensions" : [ "json" ] }, "parquet" : { "type" : "parquet" }, "avro" : { "type" : "avro" }, "csvh" : { "type" : "text", "extensions" : [ "csvh" ], "extractHeader" : true, "delimiter" : "," } } }, "format" : { "type" : "json", "extensions" : [ "json" ] }, "columns" : [ "`*`" ], "selectionRoot" : "classpath:/employee.json", "cost" : 463.0 }, { "pop" : "limit", "@id" : 3, "child" : 4, "first" : 0, "last" : 20, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 20.0 }, { "pop" : "selection-vector-remover", "@id" : 2, "child" : 3, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 20.0 }, { "pop" : "project", "@id" : 1, "exprs" : [ { "ref" : "`*`", "expr" : "`*`" } ], "child" : 2, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 20.0 }, { "pop" : "screen", "@id" : 0, "child" : 1, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 20.0 } ] }
      

      3. Submit physical plan from Web UI

      Error:

      org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: PatternSyntaxException: Unexpected internal error near index 1 \ ^ [Error Id: 4310ee06-2e84-4241-9317-553382948718 on 10.2.2.62:31010] 
      

      Checked in Chrome and Mozilla Firefox.
      Works fine on Linux.

      The problem was in FileSelection class. It used System.getProperty("file.separator") to split given path.
      But since we use org.apache.hadoop.fs.Path which stores path using its default separator, not systems -> org.apache.hadoop.fs.Path.SEPARATOR.
      Default separator on Windows is \ but given path we had / (even if it came from Windows) and that's why the error occurred. To fix this problem we just need to use org.apache.hadoop.fs.Path.SEPARATOR instead of System.getProperty("file.separator").

      Attachments

        Issue Links

          Activity

            People

              arina Arina Ielchiieva
              arina Arina Ielchiieva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: