1

Hive 0.13 にキー/値テーブルがあります (キーと値は avro 型です)。Spark SQL 1.1 でクエリを実行しようとすると、次のエラーが発生します (Hive では機能します)。

spark-sql> describe construct;
...
key struct<constructtype:string,...> from deserializer
value struct<...> from deserializer
...

spark-sql> select key.constructtype, count(*) from construct group by key.constructtype;
...

4/09/16 03:19:30 ERROR thriftserver.SparkSQLDriver: Failed in [select key.constructtype, count(*) from  construct group by key.constructtype]
org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Unresolved attributes: 'key.constructtype,'key.constructtype, tree:
Aggregate ['key.constructtype], ['key.constructtype,COUNT(1) AS c_1#0L]
4

1 に答える 1

1

spark avro lib をチェックして、これが機能するかどうかを確認してください。

https://github.com/databricks/spark-avro

于 2015-06-12T23:47:28.697 に答える