spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yin Huai (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-11522) input_file_name() returns "" for external tables
Date Mon, 16 Nov 2015 16:12:10 GMT

     [ https://issues.apache.org/jira/browse/SPARK-11522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yin Huai resolved SPARK-11522.
------------------------------
       Resolution: Fixed
    Fix Version/s: 1.6.0

Issue resolved by pull request 9542
[https://github.com/apache/spark/pull/9542]

> input_file_name() returns "" for external tables
> ------------------------------------------------
>
>                 Key: SPARK-11522
>                 URL: https://issues.apache.org/jira/browse/SPARK-11522
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.1
>            Reporter: Simeon Simeonov
>              Labels: external-tables, hive, sql
>             Fix For: 1.6.0
>
>
> Given an external table definition where the data consists of many CSV files, {{input_file_name()}}
returns empty strings.
> Table definition:
> {code}
> CREATE EXTERNAL TABLE external_test(page_id INT, impressions INT) 
> ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
> WITH SERDEPROPERTIES (
>    "separatorChar" = ",",
>    "quoteChar"     = "\"",
>    "escapeChar"    = "\\"
> )  
> LOCATION 'file:///Users/sim/spark/test/external_test'
> {code}
> Query: 
> {code}
> sql("SELECT input_file_name() as file FROM external_test").show
> {code}
> Output:
> {code}
> +----+
> |file|
> +----+
> |    |
> |    |
> ...
> |    |
> +----+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message