Guohui LI created ZEPPELIN-3075:
-----------------------------------
Summary: unique() algorithm is not correct in pivot.js file.
Key: ZEPPELIN-3075
URL: https://issues.apache.org/jira/browse/ZEPPELIN-3075
Project: Zeppelin
Issue Type: Bug
Components: front-end
Affects Versions: 0.7.3
Reporter: Guohui LI
Fix For: 0.8.0
unique() algorithm is not correct in pivot.js file.
The algo is like this:
{code:java}
let unique = function (list) {
for (let i = 0; i < list.length; i++) {
for (let j = i + 1; j < list.length; j++) {
if (angular.equals(list[i], list[j])) {
list.splice(j, 1)
}
}
}
}
{code}
But it's not correct. If the input is [2, 3, 3, 3, 4, 5] and the output will be
[2, 3, 3, 4, 5]. The number {{3}} is still duplicated.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)