Github user xwu0226 commented on the pull request:

    https://github.com/apache/spark/pull/12579#issuecomment-215303758
  
    @yhuai @liancheng , I see PR 
[#12734](https://github.com/apache/spark/pull/12734) takes care of the 
PARTITIONED BY and CLUSTERED BY (with SORTED BY) clause for CTAS syntax, but 
not for non-CTAS syntax.  Now I need to change my PR to adapt to this change, 
which means that the generated DDL will be something like `create table t1 (c1 
int, ...) using .. options (..) partitioned by (..) clustered by (...) sorted 
by (...) in ... buckets`. But there won't be a "select clause" following it 
since we do not have the original query. But such generated query will not run 
because [#12734](https://github.com/apache/spark/pull/12734) does not support 
it.  Can we add a fake select clause with a warning message?
    
    Also DataFrameWriter.saveAsTable case is like CTAS. Can we then generate 
the DDL as a regular CTAS syntax? This will change my current implementation in 
this PR. 
    Please advice, thanks a lot!


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