Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Aug 1, 2016

This PR migrates spark-xml to Spark 2.0.

This PR,

  • deprecates saveAsXmlFile and promote the usage of write().
  • deprecates xmlFile and promote the usage of read().
  • drops 1.x compatibility from 0.4.0.
  • makes not supporting UserDefinedType as it became private.

README.md Outdated
## Requirements

This library requires Spark 1.3+
This library requires Spark 2.0+ for 0.4.x. For Spark 1.3.+, 0.3.x version works with it.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a branch for 0.3.x soon and correct this documentation.

@HyukjinKwon
Copy link
Member Author

Hi @liancheng and @JoshRosen , this PR resembles the ones in spark-redshift and spark-avro. Could you please review this?

@HyukjinKwon HyukjinKwon mentioned this pull request Aug 1, 2016
@codecov-io
Copy link

codecov-io commented Aug 1, 2016

Current coverage is 87.85% (diff: 89.28%)

Merging #150 into master will decrease coverage by 2.67%

@@             master       #150   diff @@
==========================================
  Files            15         15          
  Lines           697        708    +11   
  Methods         638        641     +3   
  Messages          0          0          
  Branches         59         67     +8   
==========================================
- Hits            631        622     -9   
- Misses           66         86    +20   
  Partials          0          0          

Powered by Codecov. Last update 7ec9964...b7f00b2

def saveAsXmlFile(
path: String, parameters: Map[String, String] = Map(),
compressionCodec: Class[_ <: CompressionCodec] = null): Unit = {
val options = XmlOptions(parameters.toMap)
Copy link
Member Author

@HyukjinKwon HyukjinKwon Aug 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved below codes to src/main/scala/com/databricks/spark/xml/util/XmlFile.scala with deprecating this.

@HyukjinKwon
Copy link
Member Author

@JoshRosen @liancheng Could you please take a quick look?

case (ByteType, v: Byte) => writer.writeCharacters(v.toString)
case (BooleanType, v: Boolean) => writer.writeCharacters(v.toString)
case (DateType, v) => writer.writeCharacters(v.toString)
case (udt: UserDefinedType[_], v) => writeElement(udt.sqlType, udt.serialize(v))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove this because it was hidden from 2.0.

@HyukjinKwon
Copy link
Member Author

@JoshRosen @liancheng Could you just quickly scan this out for some not sensible changes here please?

@HyukjinKwon
Copy link
Member Author

Maybe I will merge this after double-checking this by myself if you don't have time to review this (but I will wait more just in case) - @JoshRosen @liancheng

@Esteban-De-la-Sexface
Copy link

Will this be released soon?

@HyukjinKwon
Copy link
Member Author

Yeap, I am thinking doing this on this weekend.

@Esteban-De-la-Sexface
Copy link

Thanks for the information

On Thu, Sep 8, 2016 at 3:03 PM, Hyukjin Kwon notifications@github.com
wrote:

Yeap, I am thinking doing this on this weekend.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#150 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS_MPqLonai9E_j-uHQjlsORBenBhJVIks5qoBWzgaJpZM4JZOUW
.

@HyukjinKwon
Copy link
Member Author

I am going to merge this as soon as the tests pass.

@HyukjinKwon HyukjinKwon mentioned this pull request Sep 10, 2016
HyukjinKwon added a commit that referenced this pull request Sep 10, 2016
This PR prepares the release for 0.4.0.

This will include the changes below:
  - Support for PERMISSIVE/DROPMALFORMED mode and corrupt record option. #107
  - Change default values for valueTag and attributePrefix to avoid always require field escape for some apis #142
  - deprecates saveAsXmlFile and promote the usage of write(). #150
  - deprecates xmlFile and promote the usage of read(). #150
  - drops 1.x compatibility from 0.4.0. #150
  - makes not supporting UserDefinedType as it became private. #150

Author: hyukjinkwon <gurwls223@gmail.com>

Closes #176 from HyukjinKwon/version-0.4.0.
@horizonfrost
Copy link

horizonfrost commented Oct 7, 2017

I am using spark-xml_2.10-0.2.0.jar but still facing the same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants