Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/13305#issuecomment-221735811
```
scala> sql("CREATE TABLE boxes (length INT, height INT, width INT) USING
parquet")
scala> (1 to 3).map { i => (i, i * 2, i * 3) }.toDF("height", "length",
"width").write.insertInto("boxes")
scala> spark.table("boxes").show()
+------+------+-----+
|length|height|width|
+------+------+-----+
| 1| 2| 3|
| 2| 4| 6|
| 3| 6| 9|
+------+------+-----+
scala> sql("TRUNCATE TABLE boxes")
scala> spark.catalog.refreshTable("boxes") // necessary for now, but that's
a bug
scala> spark.table("boxes").show()
+------+------+-----+
|length|height|width|
+------+------+-----+
+------+------+-----+
```
---
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]