Github user concretevitamin commented on the pull request:

    https://github.com/apache/spark/pull/956#issuecomment-45163066
  
    This PR will soon be updated to include more changes than was described.
    
    Semantics summary:
      - `sql("set ...")` returns a `SchemaRDD` which contains the actual 
results, according to the semantics below. To see them, call `collect()` on it. 
Same for `hql()`.
    
      - `sql("set").collect()` returns an Array of all currently set properties 
in the current `SQLContext#SQLConf`. Same for `hql()`.
      - `sql("set key").collect()` returns the value for the key, if it is 
previously set in the SQLConf, otherwise returns "key is not defined". In both 
cases, the result is wrapped in an Array. Same for hql() (note in this case, 
the SQLConf should contain exactly the same pairs as the underlying HiveConf).
      
      - `sql("set key=val")` will immediately set the key-val pair in the 
SQLConf. 
      - `hql("set key=val")` will immediately set the key-val pair in the 
SQLConf, as well as executing the command as a native Hive command.
      For the two cases above: the call returns a SchemaRDD. When .collect() is 
called on it, a string of the form "key=val" is returned (wrapped in Array).
    
    @rxin @marmbrust let me know if I miss anything.


---
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.
---

Reply via email to