for (Class<? extends GenericUDF> clazz: methodsGenericUDF.get(funcName)) { holder = matchAndCreateGenericUDFHolder(clazz, argTypes, argOIs); if (holder != null) { for (Class<? extends UDF> clazz : methodsUDF.get(funcName)) { holder = matchAndCreateUDFHolder(call.getName(), clazz, argTypes, argOIs); if (holder != null) {
protected final List<MinorFragmentEndpoint> getSenders(int minorFragmentId) { createSenderReceiverMapping(); List<MinorFragmentEndpoint> senders = receiverToSenderMapping.get(minorFragmentId); logger.debug("Minor fragment {}, receives data from following senders {}", minorFragmentId, senders); if (senders == null || senders.size() <= 0) { throw new IllegalStateException(String.format("Failed to find senders for receiver [%d]", minorFragmentId)); } return senders; }
@Override public Sender getSender(int minorFragmentId, PhysicalOperator child) { createSenderReceiverMapping(); List<MinorFragmentEndpoint> receivers = senderToReceiversMapping.get(minorFragmentId); if (receivers == null || receivers.size() <= 0) { throw new IllegalStateException(String.format("Failed to find receivers for sender [%d]", minorFragmentId)); } return new HashPartitionSender(receiverMajorFragmentId, child, expr, receivers); }
private void populateFromWithoutTypeInference(SqlIdentifier opName, SqlFunctionCategory category, SqlSyntax syntax, List<SqlOperator> operatorList) { inner.lookupOperatorOverloads(opName, category, syntax, operatorList); if (operatorList.isEmpty() && (syntax == SqlSyntax.FUNCTION || syntax == SqlSyntax.FUNCTION_ID) && opName.isSimple()) { List<SqlOperator> drillOps = drillOperatorsWithoutInferenceMap.get(opName.getSimple().toLowerCase()); if (drillOps != null) { operatorList.addAll(drillOps); } } }
private void populateFromTypeInference(SqlIdentifier opName, SqlFunctionCategory category, SqlSyntax syntax, List<SqlOperator> operatorList) { final List<SqlOperator> calciteOperatorList = Lists.newArrayList(); inner.lookupOperatorOverloads(opName, category, syntax, calciteOperatorList); if (!calciteOperatorList.isEmpty()) { for (SqlOperator calciteOperator : calciteOperatorList) { if (calciteToWrapper.containsKey(calciteOperator)) { operatorList.add(calciteToWrapper.get(calciteOperator)); } else { operatorList.add(calciteOperator); } } } else { // if no function is found, check in Drill UDFs if (operatorList.isEmpty() && (syntax == SqlSyntax.FUNCTION || syntax == SqlSyntax.FUNCTION_ID) && opName.isSimple()) { List<SqlOperator> drillOps = drillOperatorsWithInferenceMap.get(opName.getSimple().toLowerCase()); if (drillOps != null && !drillOps.isEmpty()) { operatorList.addAll(drillOps); } } } }
private List<DrillFuncHolder> getFunctionListWithInference(String name) { final List<DrillFuncHolder> functions = Lists.newArrayList(); for (SqlOperator sqlOperator : drillOperatorsWithInferenceMap.get(name.toLowerCase())) { if (sqlOperator instanceof DrillSqlOperator) { final List<DrillFuncHolder> list = ((DrillSqlOperator) sqlOperator).getFunctions(); if (list != null) { functions.addAll(list); } } if (sqlOperator instanceof DrillSqlAggOperator) { final List<DrillFuncHolder> list = ((DrillSqlAggOperator) sqlOperator).getFunctions(); if (list != null) { functions.addAll(list); } } } return functions; }
public List<VectorContainer> getHeldRecordBatches() { ArrayList<VectorContainer> containerList = Lists.newArrayList(); for (BatchSchema bs : batches.keySet()) { for (RecordBatchData bd : batches.get(bs)) { VectorContainer c = bd.getContainer(); c.setRecordCount(bd.getRecordCount()); containerList.add(c); } } batches.clear(); return containerList; }
final List<Integer> receiverMinorFragmentIds = endpointReceiverList.get(senderLocation);
List<Integer> senderFragmentIds = endpointSenderList.get(receiverLocation);
public BroadcastSenderRootExec(RootFragmentContext context, RecordBatch incoming, BroadcastSender config) throws OutOfMemoryException { super(context, context.newOperatorContext(config, null), config); this.ok = true; this.incoming = incoming; this.config = config; this.handle = context.getHandle(); List<MinorFragmentEndpoint> destinations = config.getDestinations(); ArrayListMultimap<DrillbitEndpoint, Integer> dests = ArrayListMultimap.create(); for(MinorFragmentEndpoint destination : destinations) { dests.put(destination.getEndpoint(), destination.getId()); } int destCount = dests.keySet().size(); int i = 0; this.tunnels = new AccountingDataTunnel[destCount]; this.receivingMinorFragments = new int[destCount][]; for(final DrillbitEndpoint ep : dests.keySet()){ List<Integer> minorsList= dests.get(ep); int[] minorsArray = new int[minorsList.size()]; int x = 0; for(Integer m : minorsList){ minorsArray[x++] = m; } receivingMinorFragments[i] = minorsArray; tunnels[i] = context.getDataTunnel(ep); i++; } }