You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/11/07 18:48:11 UTC
[jira] [Assigned] (SPARK-11522) input_file_name() returns "" for
external tables
[ https://issues.apache.org/jira/browse/SPARK-11522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-11522:
------------------------------------
Assignee: Apache Spark
> 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
> Assignee: Apache Spark
> Labels: external-tables, hive, sql
>
> 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