Skip to content

Commit

Permalink
SPARK-3807: SparkSql does not work for tables created using custom serde
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragaggarwal committed Oct 6, 2014
1 parent 964e3aa commit 5c73b72
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,15 @@ 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);

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

Expand Down

0 comments on commit 5c73b72

Please sign in to comment.