Github user aray commented on the pull request:

    https://github.com/apache/spark/pull/7841#issuecomment-155871674
  
    @yhuai RE your questions (3 was already addressed above):
    >1. Should we always ask users to provide pivot values?
    The argument for not requiring values I think is convenience and also 
similarity to other non-sql tools mentioned above. The negative is performance, 
but since we give them the option to specify I don't think that is a problem.
    >2. For the type of pivot values, should we just use String? Or, we should 
use Literal Column?
    I initially used strings as the type since that is the common usage 
scenario. But I agree that using Literal's is the better solution and will 
avoid casts which could hurt performance. For convenience I kept the second 
method (changed to `pivot(pivotColumn: String, values: Any*)`) which I think 
will be the prefered way to use pivot since it is more succinct.
    
    I really appreciate the review. Let me know if I can do anything else to 
help!


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to