title: AnalysisException: Found duplicate column(s) in the data schema: `hour`, `eventTime`
body: <p>I want to load data from json files, but i get this exception: AnalysisException: Found duplicate column(s) in the data schema: <code>hour</code>, <code>eventTime</code>， this is my code</p>
  
  <pre><code>ss.sqlContext.setConf("spark.sql.caseSensitive", "true")
  val pathList = buildFilePath(eid, url, startTime, endTime)
  println(pathList)
  val writePath = "/result/" + id + "/" + eid
  ss.read
    .json(pathList: _*)
    .select(columns.split(",").map(m =&gt; new Column(m.trim)): _*)
    .repartition(1)
    .write.option("header", "true").csv(writePath)
  
  ss.close()
  
  def buildFilePath(eid: String, urls: String, startTime: String, endTime: String): List[String] = {
  var eventPath = ""
  if (eid.equals("1")) {
    eventPath = basePath + "/event1"
  } else if (eid.equals("2")) {
    eventPath = basePath + "/event2"
  }
  urls
    .split(",")
    .flatMap(url =&gt; {
      val dateList = getTimeRange(startTime, endTime, "yyyy-MM-dd")
      dateList
        .par
        .map(date =&gt; eventPath + "/" + url.trim + "/" + date)
        .flatMap(p =&gt; Hdfs.files(p).flatMap(f =&gt; Hdfs.files(f)))
    })
    .map(m =&gt; m.toString)
    .toList
  </code></pre>
  
  <p>}</p>