com.google.common.collect.FluentIterable



API Populatity

29 Client projects

Project: com.google

Project facebook/presto in file ...acebook.presto.sql.analyzer.StatementAnalyzer.java (2015-01-29)
@@ -55,6 +55,7 @@ import com.facebook.presto.sql.tree.Values;
 import com.facebook.presto.sql.tree.With;
 import com.facebook.presto.sql.tree.WithQuery;
 import com.google.common.base.Joiner;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.primitives.Ints;
 
@@ -364,7 +365,9 @@ class StatementAnalyzer
         analysis.setInsertTarget(targetTableHandle.get());
 
         List<ColumnMetadata> columns = metadata.getTableMetadata(targetTableHandle.get()).getColumns();
-        Iterable<Type> tableTypes = transform(columns, ColumnMetadata::getType);
+        Iterable<Type> tableTypes = FluentIterable.from(columns)
+                .filter(column -> !column.isHidden())
+                .transform(ColumnMetadata::getType);
 
         Iterable<Type> queryTypes = transform(descriptor.getVisibleFields(), Field::getType);
 
Project jclouds/jclouds in file ...a.org.jclouds.sqs.internal.BaseSQSApiLiveTest.java (2012-09-15)
@@ -39,6 +39,7 @@ import org.jclouds.sqs.features.QueueApi;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Sets;
 import com.google.common.reflect.TypeToken;
 import com.google.common.util.concurrent.Uninterruptibles;
@@ -60,7 +61,7 @@ public class BaseSQSApiLiveTest extends BaseContextLiveTest<RestContext<SQSApi,
 
    protected String recreateQueueInRegion(String queueName, String region) {
       QueueApi api = api().getQueueApiForRegion(region);
-      Set<URI> result = api.list(queuePrefix(queueName));
+      FluentIterable<URI> result = api.list(queuePrefix(queueName));
       if (result.size() >= 1) {
          api.delete(getLast(result));
       }
@@ -110,7 +111,7 @@ public class BaseSQSApiLiveTest extends BaseContextLiveTest<RestContext<SQSApi,
       final URI finalQ = queue;
       assertEventually(new Runnable() {
          public void run() {
-            Set<URI> result = api().getQueueApiForRegion(region).list();
+            FluentIterable<URI> result = api().getQueueApiForRegion(region).list();
             assertNotNull(result);
             assert result.size() >= 1 : result;
             assertTrue(result.contains(finalQ), finalQ + " not in " + result);
Project jclouds/legacy-jclouds in file ...a.org.jclouds.sqs.internal.BaseSQSApiLiveTest.java (2012-09-15)
@@ -39,6 +39,7 @@ import org.jclouds.sqs.features.QueueApi;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Sets;
 import com.google.common.reflect.TypeToken;
 import com.google.common.util.concurrent.Uninterruptibles;
@@ -60,7 +61,7 @@ public class BaseSQSApiLiveTest extends BaseContextLiveTest<RestContext<SQSApi,
 
    protected String recreateQueueInRegion(String queueName, String region) {
       QueueApi api = api().getQueueApiForRegion(region);
-      Set<URI> result = api.list(queuePrefix(queueName));
+      FluentIterable<URI> result = api.list(queuePrefix(queueName));
       if (result.size() >= 1) {
          api.delete(getLast(result));
       }
@@ -110,7 +111,7 @@ public class BaseSQSApiLiveTest extends BaseContextLiveTest<RestContext<SQSApi,
       final URI finalQ = queue;
       assertEventually(new Runnable() {
          public void run() {
-            Set<URI> result = api().getQueueApiForRegion(region).list();
+            FluentIterable<URI> result = api().getQueueApiForRegion(region).list();
             assertNotNull(result);
             assert result.size() >= 1 : result;
             assertTrue(result.contains(finalQ), finalQ + " not in " + result);