Github user chutium commented on a diff in the pull request:
https://github.com/apache/spark/pull/1855#discussion_r16294353
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala ---
@@ -403,7 +406,10 @@ private[parquet] object ParquetTypesConverter extends
Logging {
* @param conf The Hadoop configuration to use.
* @return A list of attributes that make up the schema.
*/
- def readSchemaFromFile(origPath: Path, conf: Option[Configuration]):
Seq[Attribute] = {
+ def readSchemaFromFile(
+ origPath: Path,
+ conf: Option[Configuration],
+ isBinaryAsString: Boolean): Seq[Attribute] = {
val keyValueMetadata: java.util.Map[String, String] =
readMetaData(origPath, conf)
.getFileMetaData
--- End diff --
this patch will be great for impala users like us :) thanks, moreover,
there is a ```getCreatedBy``` method in ```readMetaData(origPath,
conf).getFileMetaData```, and impala creates parquet files always its own
CreatedBy information (always contains string "impala"), so, maybe we can do
some auto-detection like (https://github.com/apache/spark/pull/1599/files)
```
if (fileMetaData.getCreatedBy.contains("impala")) {
isBinaryAsString = true
}
```
does this auto-detection make sense?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]