Github user budde commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16944#discussion_r102547965
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala ---
    @@ -296,6 +296,21 @@ object SQLConf {
           .longConf
           .createWithDefault(250 * 1024 * 1024)
     
    +  object HiveCaseSensitiveInferenceMode extends Enumeration {
    --- End diff --
    
    I'm trying to avoid using string literals. If we want to change the 
possible values for this param we would need to find each and every place the 
literal value is used and update it. I think this is too flaky and runs the 
risk of introducing bugs that will only be apparent at runtime. Expressing this 
as an enumeration gives us some level of type safety and at the very least will 
cause a compiler error if the possible values are changed and comparisons 
elsewhere in the code aren't updated.
    
    I'm willing to remove the enumeration if it isn't consistent with Spark 
code practices but at the very least the possible values should be expressed as 
constants rather than literals.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to