You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Emmanuelle Raffenne (JIRA)" <ji...@apache.org> on 2015/05/26 10:45:18 UTC
[jira] [Created] (ZEPPELIN-88) Group label truncated when starting
with digits
Emmanuelle Raffenne created ZEPPELIN-88:
-------------------------------------------
Summary: Group label truncated when starting with digits
Key: ZEPPELIN-88
URL: https://issues.apache.org/jira/browse/ZEPPELIN-88
Project: Zeppelin
Issue Type: Bug
Components: GUI
Affects Versions: 0.5.0
Reporter: Emmanuelle Raffenne
Priority: Minor
When setting a group for a bar chart on a field that starts with digits and contains a period (e.g. an IP), the label of the group is truncated to the first digits.
Code to reproduce:
%spark
import sqlc.implicits._
case class Event(code :String, ip :String, count :Int)
val data = Array("200,127.0.0.1,3",
"200,192.168.0.12,15",
"200,127.0.0.1,10",
"200,192.168.0.12,2",
"401,127.0.0.1,1",
"401,192.168.0.12,2",
"401,127.0.0.1,3",
"401,192.168.0.12,4")
val df = sc.parallelize(data).map( l => l.split(",")).map( l => Event(l(0),l(1), l(2).toInt)).toDF
df.registerTempTable("events")
// -------------
%sql select * from events
Then display a bar chart with the following settings:
Keys: code
Groups: ip
Values: count SUM
I have added log messages to have a look at the data object content. pivot(data) returns the following object:
{"schema":{
"code":{
"order":0,
"index":0,
"type":"key",
"children":{
"127.0.0.1":{
"order":0,
"index":1,
"type":"group",
"children":{"count(sum)":{"type":"value","order":0,"index":2}}},
"192.168.0.12":{
"order":0,
"index":1,
"type":"group",
"children":{"count(sum)":{"type":"value","order":0,"index":2}}}}}},
"rows":{
"200":{
"127.0.0.1":{"count(sum)":{"value":13,"count":1}},
"192.168.0.12":{"count(sum)":{"value":17,"count":1}}},
"401":{
"127.0.0.1":{"count(sum)":{"value":4,"count":1}},
"192.168.0.12":{"count(sum)":{"value":6,"count":1}}}}}
and d3g contains:
[{
"values":[
{"x":200,"y":13},
{"x":401,"y":4}],
"key":"127" <== truncated
},{
"values":[
{"x":200,"y":17},
{"x":401,"y":6}],
"key":"192" <== truncated
}]
I attach a screenshot also.
We are looking into fixing it and will comment when done.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)