Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16133#discussion_r90783813
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala ---
    @@ -533,31 +533,54 @@ class ColumnExpressionSuite extends QueryTest with 
SharedSQLContext {
         )
       }
     
    -  test("input_file_name - FileScanRDD") {
    +  test("input_file_name, input_file_block_start, input_file_block_length - 
FileScanRDD") {
         withTempPath { dir =>
           val data = sparkContext.parallelize(0 to 10).toDF("id")
           data.write.parquet(dir.getCanonicalPath)
    -      val answer = 
spark.read.parquet(dir.getCanonicalPath).select(input_file_name())
    -        .head.getString(0)
    -      assert(answer.contains(dir.getCanonicalPath))
     
    -      checkAnswer(data.select(input_file_name()).limit(1), Row(""))
    +      // Test the 3 expressions when reading from files
    +      val q = spark.read.parquet(dir.getCanonicalPath).select(
    +        input_file_name(), expr("input_file_block_start()"), 
expr("input_file_block_length()"))
    --- End diff --
    
    I'm actually intentionally not adding those because I don't know how common 
these expressions will be.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to