spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhuai <...@git.apache.org>
Subject [GitHub] spark pull request: [Spark-11522][SQL] input_file_name() returns "...
Date Sun, 15 Nov 2015 03:16:40 GMT
Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9542#discussion_r44866981
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
---
    @@ -356,6 +356,66 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton {
     
         sqlContext.dropTempTable("testUDF")
       }
    +
    +  test("SPARK-11522 select input_file_name from non-parquet table"){
    +
    +    // EXTERNAL OpenCSVSerde table pointing to LOCATION
    +
    +    val location1 = Utils.getSparkClassLoader.getResource("data/files/csv_table").getFile
    +    sql(s"""CREATE EXTERNAL TABLE csv_table(page_id INT, impressions INT)
    +         ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
    +         WITH SERDEPROPERTIES (
    +           \"separatorChar\" = \",\",
    +           \"quoteChar\"     = \"\\\"\",
    +           \"escapeChar\"    = \"\\\\\")
    +         LOCATION '$location1'""")
    --- End diff --
    
    Can we use the following format?
    ```
    sql(
      s"""
      ....
      """)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message