wangyum commented on issue #22721: [SPARK-19784][SPARK-25403][SQL] Refresh the 
table even table stats is empty
URL: https://github.com/apache/spark/pull/22721#issuecomment-571031416
 
 
   Yes. It still exist:
   ```scala
   scala> spark.version
   res0: String = 3.0.0-preview2
   
   scala> val path = "/tmp/spark/parquet"
   path: String = /tmp/spark/parquet
   
   scala> spark.sql("CREATE TABLE t (a INT) USING parquet")
   res1: org.apache.spark.sql.DataFrame = []
   
   scala> spark.sql("INSERT INTO TABLE t VALUES (1)")
   res2: org.apache.spark.sql.DataFrame = []
   
   scala> spark.range(5).toDF("a").write.parquet(path)
   
   scala> spark.sql(s"ALTER TABLE t SET LOCATION '${path}'")
   res4: org.apache.spark.sql.DataFrame = []
   
   scala> spark.table("t").count() // return 1
   res5: Long = 1
   
   scala> spark.sql("refresh table t")
   res6: org.apache.spark.sql.DataFrame = []
   
   scala> spark.table("t").count() // return 5
   res7: Long = 5
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to