maropu commented on issue #23841: [SPARK-26936][SQL] Fix bug of insert 
overwrite local dir and inconsistent behavior with Hive
URL: https://github.com/apache/spark/pull/23841#issuecomment-467488247
 
 
   I realized that the test you added passed in the master without your fix... 
Can you check again?
   Your example query is like this?
   ```
   $ls /tmp/noexistdir/t/
   ls: /tmp/noexistdir/t/: No such file or directory
   
   scala> sql("""create table t(c0 int, c1 int)""")
   scala> spark.table("t").explain
   == Physical Plan ==
   Scan hive default.t [c0#5, c1#6], HiveTableRelation `default`.`t`, 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c0#5, c1#6]
   
   scala> sql("""insert into t values(1, 1)""")
   scala> sql("""select * from t""").show
   +---+---+
   | c0| c1|
   +---+---+
   |  1|  1|
   +---+---+
   
   scala> sql("""insert overwrite local directory '/tmp/noexistdir/t' select * 
from t""")
   
   $ls /tmp/noexistdir/t/
   _SUCCESS  part-00000-bbea4213-071a-49b4-aac8-8510e7263d45-c000
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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