GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/14399
[SPARK-16777][SQL] Do not use deprecated listType API in
ParquetSchemaConverter
## What changes were proposed in this pull request?
This PR removes build waning as below.
```scala
[WARNING]
.../spark/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala:448:
method listType in object ConversionPatterns is deprecated: see corresponding
Javadoc for more information.
[WARNING] ConversionPatterns.listType(
[WARNING] ^
[WARNING]
.../spark/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala:464:
method listType in object ConversionPatterns is deprecated: see corresponding
Javadoc for more information.
[WARNING] ConversionPatterns.listType(
[WARNING] ^
```
This should not use `listOfElements` (recommended to be replaced from
`listType`) instead because the new method checks if the name of elements in
Parquet's `LIST` is `element` in Parquet schema and throws an exception if not.
However, It seems Spark prior to 1.4.x writes `ArrayType` with Parquet's `LIST`
but with `array` as its element name.
Therefore, this PR avoids to use both `listOfElements` and `listType` but
just use the existing schema builder to construct the same `GroupType`.
## How was this patch tested?
Existing tests should cover this.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-16777
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14399.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14399
----
commit 78c7fb533aa897eb4e38f7f09c4ba66835c2d906
Author: hyukjinkwon <[email protected]>
Date: 2016-07-29T07:30:52Z
Do not use deprecated listType API
commit 437414b0ba2fd369f6f8cfb414c8581d61ddb627
Author: hyukjinkwon <[email protected]>
Date: 2016-07-29T07:33:30Z
Fix comments
----
---
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]