subhramit commented on code in PR #58226:
URL: https://github.com/apache/spark/pull/58226#discussion_r3966996594
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala:
##########
@@ -124,7 +124,7 @@ class CSVOptions(
val extension = {
val ext = parameters.getOrElse(EXTENSION, "csv")
- if (ext.size != 3 && !ext.forall(_.isLetter)) {
+ if (ext.size != 3 || !ext.forall(_.isLetter)) {
Review Comment:
> but shouldn't functionality dictate error messages rather then vice versa?
Yes, I agree, however:
>I don't understand why we are limiting ourselves to just 3 character
extensions.
I'm not sure I follow - the scope of this is csv files, thus how can a csv
file have a non-three-character extension?
Furthermore, this PR is not introducing a new three-character policy, as you
can see, it already existed ^, just in a buggy/inconsistent way.
We are just trying to fix that here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]