Skip to content

Conversation

@gengliangwang
Copy link
Member

@gengliangwang gengliangwang commented Jul 24, 2018

What changes were proposed in this pull request?

After rethinking on the artifactId, I think it should be spark-avro instead of spark-sql-avro, which is simpler, and consistent with the previous artifactId. I think we need to change it before Spark 2.4 release.

Also a tiny change: use spark.sessionState.newHadoopConf() to get the hadoop configuration, thus the related hadoop configurations in SQLConf will come into effect.

How was this patch tested?

Unit test

options: Map[String, String],
files: Seq[FileStatus]): Option[StructType] = {
val conf = spark.sparkContext.hadoopConfiguration
val conf = spark.sessionState.newHadoopConf()
Copy link
Member

Choose a reason for hiding this comment

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

A good catch!

Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a linter rule for this?

Copy link
Member

Choose a reason for hiding this comment

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

@gengliangwang Please help this?

Copy link
Member Author

@gengliangwang gengliangwang Jul 25, 2018

Choose a reason for hiding this comment

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

Sure, will do it.
Can I make it a simple one, check the appearance of
spark.sparkContext.hadoopConfiguration ?
Otherwise there are too many usage for the sparkContext.hadoopConfiguration

@gatorsmile
Copy link
Member

LGTM

@SparkQA
Copy link

SparkQA commented Jul 24, 2018

Test build #93518 has finished for PR 21866 at commit cff6f2a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Jul 25, 2018

Test build #93528 has finished for PR 21866 at commit cff6f2a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

1 similar comment
@gatorsmile
Copy link
Member

retest this please

@gatorsmile
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Jul 25, 2018

Test build #93536 has finished for PR 21866 at commit cff6f2a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Jul 25, 2018

Test build #93541 has finished for PR 21866 at commit cff6f2a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member

Thanks! Merged to master.

@asfgit asfgit closed this in c44eb56 Jul 25, 2018
otterc pushed a commit to linkedin/spark that referenced this pull request Mar 22, 2023
…Id to spark-avro

After rethinking on the artifactId, I think it should be `spark-avro` instead of `spark-sql-avro`, which is simpler, and consistent with the previous artifactId. I think we need to change it before Spark 2.4 release.

Also a tiny change: use `spark.sessionState.newHadoopConf()` to get the hadoop configuration, thus the related hadoop configurations in SQLConf will come into effect.

Unit test

Author: Gengliang Wang <gengliang.wang@databricks.com>

Closes apache#21866 from gengliangwang/avro_followup.

(cherry picked from commit c44eb56)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants