public FunctionHolderExpression(String nameUsed, ExpressionPosition pos, List<LogicalExpression> args) { super(pos); if (args == null) { args = Lists.newArrayList(); } if (!(args instanceof ImmutableList)) { args = ImmutableList.copyOf(args); } this.args = (ImmutableList<LogicalExpression>) args; this.nameUsed = nameUsed; }
public LogicalPlanBuilder addStorageEngine(String name, StoragePluginConfig config) { this.storageEngines.put(name, config); return this; } public LogicalPlanBuilder addLogicalOperator(LogicalOperator operator) {
@Override public Set<Entry<K, V>> entrySet() { return Sets.newHashSet(Iterables.transform(primary.entrySet(), new Function<Entry<K, Entry<Integer, V>>, Entry<K, V>>() { @Override public Entry<K, V> apply(Entry<K, Entry<Integer, V>> entry) { return new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), entry.getValue().getValue()); } })); } };
/** * Returns a sequence of field names in the order that they show up in the schema. */ protected Collection<String> getChildFieldNames() { return Sets.newLinkedHashSet(Iterables.transform(field.getChildren(), new Function<MaterializedField, String>() { @Nullable @Override public String apply(MaterializedField field) { return Preconditions.checkNotNull(field).getName(); } })); }
@Override public Set<StoragePluginOptimizerRule> getPhysicalOptimizerRules(OptimizerRulesContext optimizerRulesContext) { return ImmutableSet.of(HBasePushFilterIntoScan.FILTER_ON_SCAN, HBasePushFilterIntoScan.FILTER_ON_PROJECT); }
public HivePartitionLocation(final List<String> partitionValues, final String partitionLocation) { this.partitionValues = ImmutableList.copyOf(partitionValues); this.partitionLocation = partitionLocation; } @Override
private static String likeString(FunctionCall call) { return ((QuotedString) call.args.get(1)).value; }
public LogicalPlanBuilder addLogicalOperator(LogicalOperator operator) { this.operators.add(operator); return this; } public LogicalPlan build() {
@Override public Iterator<LogicalExpression> iterator() { return args.iterator(); }
void clearVisited() { for (Edge<Node> e : adjacencies.values()) { e.from.visited = false; e.to.visited = false; } }
public Set<Node> getNodeSet() { return adjacencies.keySet(); }
public FunctionCall(String name, List<LogicalExpression> args, ExpressionPosition pos) { super(pos); this.name = name; if (args == null) { args = Lists.newArrayList(); } if (!(args instanceof ImmutableList)) { args = ImmutableList.copyOf(args); } this.args = (ImmutableList<LogicalExpression>) args; this.pos = pos; }
@Override public Iterator<LogicalExpression> iterator() { return args.iterator(); }