Bug 155262 Total.countDistinct() method returns null on empty resultset
If you use Total.countDistinct(row.aColumn, null, 0) or Total.countDistinct(dataSetRow.aColumn, null, 0) and the resultset for the dataset is empty, the method returns null. It should return 0.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/aggregation/JSAggrValueObject.java
/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.data.engine.impl.aggregation;
import java.util.List;
import org.eclipse.birt.data.engine.api.aggregation.IAggregation;
import org.eclipse.birt.data.engine.core.DataException;
import org.eclipse.birt.data.engine.odi.IResultIterator;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
/**
 * JS object to retrieve aggregation value.
 */
public class JSAggrValueObject extends ScriptableObject