Bug 416703 Mongodb : Display correctly the Number data type
data/org.eclipse.birt.data.oda.mongodb/src/org/eclipse/birt/data/oda/mongodb/internal/impl/MDbMetaData.java
public Integer getPreferredNativeDataType( boolean isAutoFlattening )
        {
            Set<Integer> nativeDataTypes = getNativeDataTypes();
            if( nativeDataTypes.isEmpty() )
                return Integer.valueOf(BSON.NULL);    
            
            if( hasArrayDataType() )
            {
                if( isAutoFlattening )
                {
                    
                    
                    if( ! hasDocumentDataType() )
                        return getScalarNativeDataType();
                }
                return Integer.valueOf(BSON.ARRAY);
            }
       
            if( hasDocumentDataType() )
                return Integer.valueOf(BSON.OBJECT);
            if( getNativeDataTypes().contains( Integer.valueOf(BSON.STRING) ) )
                return Integer.valueOf(BSON.STRING);    
            
            return nativeDataTypes.iterator().next();   
        }
        /**
         * Returns all the known data types of the specified field.
         * The same named field could have a different data type in a separate document
         * within a collection.