kelvin-qin commented on issue #3662:
URL: https://github.com/apache/hudi/issues/3662#issuecomment-938489457


   @xushiyan Thanks,Leave on vacation.I tested it directly with spark-sql again:
   ## start cmd line like this
   /path-to-spark3/spark-3.0.3/bin/spark-sql --master yarn --conf 
'spark.serializer=org.apache.spark.serializer.KryoSerializer' --conf 
'spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension'
   
   ## spark version info:
   21/10/08 17:01:41 INFO SparkContext: Running Spark version 3.0.3
   21/10/08 17:01:41 INFO ResourceUtils: =====================
   21/10/08 17:01:41 INFO ResourceUtils: Resources for spark.driver:
   
   ## create hudi table cmd:
   spark-sql>create table if not exists hudi_table0 (
     id int, 
     name string, 
     price double
   ) using hudi
   options (
     type = 'cow',
     primaryKey = 'id'
   ); 
   ## CTAS cmd:
   spark-sql> create table  h0 using hudi options (type = 'cow',primaryKey = 
'id') as select id,name,price from hudi_table0; 
   
   ## Show tables
   spark-sql> show tables;
   default h0      false
   default hudi_table0     false
   
   ## DESC tables:
   1. hudi_table0
   spark-sql> desc formatted hudi_table0;
   ---
   Database        default
   Table   hudi_table0
   Owner   hive
   Created Time    Fri Oct 08 17:06:04 CST 2021
   Last Access     UNKNOWN
   Created By      Spark 3.0.3
   Type    MANAGED
   Provider        hudi
   
   2. h0
   spark-sql> desc formatted h0;
   ---
   Database        default
   Table   h0
   Created Time    Fri Oct 08 17:08:09 CST 2021
   Last Access     UNKNOWN
   Created By      Spark 2.2 or prior
   Type    EXTERNAL
   Provider        hudi
   
   # So,the h0 Created By      Spark 2.2 or prior


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


Reply via email to