Skip to content

Commit

Permalink
SPARK-3807: SparkSql does not work for tables created using custom se…
Browse files Browse the repository at this point in the history
…rde (Incorporated Review Comments)
  • Loading branch information
chiragaggarwal committed Oct 10, 2014
1 parent ba4bc0c commit 1f26805
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,14 @@ case class HiveTableScan(
ColumnProjectionUtils.appendReadColumnIDs(hiveConf, neededColumnIDs)
ColumnProjectionUtils.appendReadColumnNames(hiveConf, attributes.map(_.name))

val td = relation.tableDesc
val deClass = td.getDeserializerClass;
val de = deClass.newInstance();
de.initialize(hiveConf, td.getProperties);
val tableDesc = relation.tableDesc
val deserializer = tableDesc.getDeserializerClass.newInstance
deserializer.initialize(hiveConf, tableDesc.getProperties)

// Specifies types and object inspectors of columns to be scanned.
val structOI = ObjectInspectorUtils
.getStandardObjectInspector(
de.getObjectInspector,
deserializer.getObjectInspector,
ObjectInspectorCopyOption.JAVA)
.asInstanceOf[StructObjectInspector]

Expand Down

0 comments on commit 1f26805

Please sign in to comment.