Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-26128

filter breaks input_file_name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Spark Shell
    • Labels:
      None

      Description

      This works:

      scala> spark.read.parquet("/tmp/newparquet").select(input_file_name).show(5,false)
      +-----------------------------------------------------------------------------------------------------------------------------------------------------+
      |input_file_name()                                                                                                                                    |
      +-----------------------------------------------------------------------------------------------------------------------------------------------------+
      |file:///tmp/newparquet/parquet-5-PT6H/junit/data/tenant=NA/year=2017/month=201704/day=20170406/hour=2017040618/data.eu-west-1b.290.PT6H.FINAL.parquet|
      |file:///tmp/newparquet/parquet-5-PT6H/junit/data/tenant=NA/year=2017/month=201704/day=20170406/hour=2017040618/data.eu-west-1b.290.PT6H.FINAL.parquet|
      |file:///tmp/newparquet/parquet-5-PT6H/junit/data/tenant=NA/year=2017/month=201704/day=20170406/hour=2017040618/data.eu-west-1b.290.PT6H.FINAL.parquet|
      |file:///tmp/newparquet/parquet-5-PT6H/junit/data/tenant=NA/year=2017/month=201704/day=20170406/hour=2017040618/data.eu-west-1b.290.PT6H.FINAL.parquet|
      |file:///tmp/newparquet/parquet-5-PT6H/junit/data/tenant=NA/year=2017/month=201704/day=20170406/hour=2017040618/data.eu-west-1b.290.PT6H.FINAL.parquet|
      +-----------------------------------------------------------------------------------------------------------------------------------------------------+
      
      

      When adding a filter:

      scala> spark.read.parquet("/tmp/newparquet").where("key.station='XYZ'").select(input_file_name()).show(5,false)
      +-----------------+
      |input_file_name()|
      +-----------------+
      | |
      | |
      | |
      | |
      | |
      +-----------------+
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              praetp Paul Praet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: