It is fixed in ZEPPELIN-3701, I will backport it to branch-0.8.


Metin OSMAN <mos...@mixdata.com>于2018年9月20日周四 上午12:43写道:

> Hi,
>
> I have a DataFrame with String colums containing only numbers like values,
> but with leading zeros.
>
> when I query the DF through a temptable in a spark.sql interpreter, the
> table shows the values without the leading zeros.
> If I export the data to a csv file, the zeros are also removed.
>
> I don't know if this is an issue with the table viewer, or is it in the
> way that I construct the query ?
>
> Here is a sample :
>
> ----
> %spark
>
> val values = List("001", "01", "1234")
> import spark.implicits._
> val df = values.toDF
> df.registerTempTable("temp")
>
> %sql
> select value from temp
> ----
>
> The resulting table shows :
> 1
> 1
> 1234
>
> Thanks for your help,
>
> Metin
>
>
>
>

Reply via email to