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

Xiao Li resolved SPARK-21599.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

> Collecting column statistics for datasource tables may fail with 
> java.util.NoSuchElementException
> -------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-21599
>                 URL: https://issues.apache.org/jira/browse/SPARK-21599
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Dilip Biswal
>            Assignee: Dilip Biswal
>             Fix For: 2.3.0
>
>
> Collecting column level statistics for non compatible hive tables using 
> {code}
> ANALYZE TABLE <tableName> FOR COLUMNS <column_list>
> {code}
> may fail with the following exception.
> {code}
> key not found: a
> java.util.NoSuchElementException: key not found: a
>       at scala.collection.MapLike$class.default(MapLike.scala:228)
>       at scala.collection.AbstractMap.default(Map.scala:59)
>       at scala.collection.MapLike$class.apply(MapLike.scala:141)
>       at scala.collection.AbstractMap.apply(Map.scala:59)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$alterTableStats$1$$anonfun$apply$mcV$sp$3.apply(HiveExternalCatalog.scala:657)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$alterTableStats$1$$anonfun$apply$mcV$sp$3.apply(HiveExternalCatalog.scala:656)
>       at scala.collection.immutable.Map$Map2.foreach(Map.scala:137)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$alterTableStats$1.apply$mcV$sp(HiveExternalCatalog.scala:656)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$alterTableStats$1.apply(HiveExternalCatalog.scala:634)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$alterTableStats$1.apply(HiveExternalCatalog.scala:634)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:97)
>       at 
> org.apache.spark.sql.hive.HiveExternalCatalog.alterTableStats(HiveExternalCatalog.scala:634)
>       at 
> org.apache.spark.sql.catalyst.catalog.SessionCatalog.alterTableStats(SessionCatalog.scala:375)
>       at 
> org.apache.spark.sql.execution.command.AnalyzeColumnCommand.run(AnalyzeColumnCommand.scala:57)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to