/*
 * Copyright 2016-2018 shardingsphere.io.
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * </p>
 */

package io.shardingsphere.core.executor.sql.execute.result;

import com.google.common.collect.Multimap;
import io.shardingsphere.core.parsing.parser.context.selectitem.AggregationDistinctSelectItem;
import org.junit.Before;
import org.junit.Test;

import java.util.Collection;

public class AggregationDistinctQueryMetaDataTest {
    
    private Collection<AggregationDistinctSelectItem> aggregationDistinctSelectItems;
    
    private Multimap<String, Integer> columnLabelAndIndexMap;
    
    @Before
    public void setUp() {
    }
    
    @Test
    public void assertGetAggregationDistinctColumnIndexes() {
    }
    
    @Test
    public void assertGetAggregationDistinctColumnLabels() {
    }
    
    @Test
    public void assertGetAggregationType() {
    }
    
    @Test
    public void assertGetDerivedCountColumnIndexes() {
    }
    
    @Test
    public void assertGetDerivedSumColumnIndexes() {
    }
    
    @Test
    public void assertGetAggregationDistinctColumnIndex() {
    }
    
    @Test
    public void assertGetAggregationDistinctColumnIndex1() {
    }
    
    @Test
    public void assertGetAggregationDistinctColumnLabel() {
    }
}

@@ -703,24 +703,167 @@
 mon.
-collect.Multimap
+base.Optional;%0Aimport com.google.common.collect.HashMultimap;%0Aimport com.google.common.collect.Multimap;%0Aimport io.shardingsphere.core.constant.AggregationType
 ;%0Aim
@@ -1032,16 +1032,45 @@
 lection;
+%0Aimport java.util.LinkedList;
 %0A%0Apublic
@@ -1132,16 +1132,22 @@
 private 
+final 
 Collecti
@@ -1210,16 +1210,37 @@
 ectItems
+ = new LinkedList%3C%3E()
 ;%0A    %0A 
@@ -1250,16 +1250,22 @@
 private 
+final 
 Multimap
@@ -1304,16 +1304,40 @@
 IndexMap
+ = HashMultimap.create()
 ;%0A    %0A 
@@ -1369,24 +1369,594 @@
 d setUp() %7B%0A
+        AggregationDistinctSelectItem distinctCountSelectItem = new AggregationDistinctSelectItem(AggregationType.COUNT, %22(DISTINCT order_id)%22, Optional.of(%22c%22), %22order_id%22);%0A        AggregationDistinctSelectItem distinctAvgSelectItem = new AggregationDistinctSelectItem(AggregationType.AVG, %22(DISTINCT order_id)%22, Optional.of(%22a%22), %22order_id%22);%0A        aggregationDistinctSelectItems.add(distinctCountSelectItem);%0A        aggregationDistinctSelectItems.add(distinctAvgSelectItem);%0A        columnLabelAndIndexMap.put(%22c%22, 1);%0A        columnLabelAndIndexMap.put(%22a%22, 2);%0A
     %7D%0A    %0A 

add setUp()