HyukjinKwon commented on a change in pull request #28896:
URL: https://github.com/apache/spark/pull/28896#discussion_r443900676
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala
##########
@@ -103,7 +103,16 @@ class CSVInferSchema(val options: CSVOptions) extends
Serializable {
typeSoFar
} else {
typeSoFar match {
- case NullType => tryParseInteger(field)
+ case NullType =>
+ tryParseInteger(field) match {
Review comment:
Let's don't have a separate rule alone here. The problem here seems like
when the type is inferred from single partition alone, and the compatible types
are not respected. You might have to call `compatibleType` from my cursory look.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]