public void SetUp()
        {
            _container = SupportContainer.Reset();
            var selectList                  = SupportSelectExprFactory.MakeNoAggregateSelectList();
            var eventAdapterService         = _container.Resolve <EventAdapterService>();
            var vaeService                  = new SupportValueAddEventService();
            var selectExprEventTypeRegistry = new SelectExprEventTypeRegistry(
                "abc", new StatementEventTypeRefImpl(_container.RWLockManager()));
            var engineImportService = SupportEngineImportServiceFactory.Make(_container);

            _methodOne = new SelectExprProcessorHelper(
                Collections.GetEmptyList <int>(), selectList, Collections.GetEmptyList <SelectExprStreamDesc>(),
                null, null, false, new SupportStreamTypeSvc1Stream(), eventAdapterService, vaeService,
                selectExprEventTypeRegistry, engineImportService, 1, "stmtname", null,
                new Configuration(_container), null,
                new TableServiceImpl(_container), null);

            var insertIntoDesc = new InsertIntoDesc(SelectClauseStreamSelectorEnum.ISTREAM_ONLY, "Hello");

            insertIntoDesc.Add("a");
            insertIntoDesc.Add("b");

            _methodTwo = new SelectExprProcessorHelper(
                Collections.GetEmptyList <int>(), selectList, Collections.GetEmptyList <SelectExprStreamDesc>(),
                insertIntoDesc, null, false, new SupportStreamTypeSvc1Stream(), eventAdapterService, vaeService,
                selectExprEventTypeRegistry, engineImportService, 1, "stmtname", null,
                new Configuration(_container), null,
                new TableServiceImpl(_container), null);
        }
Example #2
0
        public void SetUp()
        {
            _container            = SupportContainer.Reset();
            _agentInstanceContext = SupportStatementContextFactory.MakeAgentInstanceContext(_container);

            var selectExprEventTypeRegistry = new SelectExprEventTypeRegistry(
                "abc", new StatementEventTypeRefImpl(_container.RWLockManager()));
            var factory = new SelectExprProcessorHelper(
                Collections.GetEmptyList <int>(),
                SupportSelectExprFactory.MakeSelectListFromIdent("TheString", "s0"),
                Collections.GetEmptyList <SelectExprStreamDesc>(),
                null, null, false,
                new SupportStreamTypeSvc1Stream(),
                _container.Resolve <EventAdapterService>(), null,
                selectExprEventTypeRegistry,
                _agentInstanceContext.StatementContext.EngineImportService,
                1, "stmtname", null,
                new Configuration(_container), null,
                new TableServiceImpl(_container),
                null);
            var selectProcessor = factory.GetEvaluator();

            _supportAggregationService = new SupportAggregationService();

            var groupKeyNodes = new ExprEvaluator[2];

            groupKeyNodes[0] = SupportExprNodeFactory.MakeIdentNode("IntPrimitive", "s0").ExprEvaluator;
            groupKeyNodes[1] = SupportExprNodeFactory.MakeIdentNode("IntBoxed", "s0").ExprEvaluator;

            var prototype = new ResultSetProcessorRowPerGroupFactory(selectProcessor, null, groupKeyNodes, null, true, false, null, false, false, false, false, null, false, 1, null);

            _processor = (ResultSetProcessorRowPerGroup)prototype.Instantiate(null, _supportAggregationService, _agentInstanceContext);
        }
Example #3
0
        public void SetUp()
        {
            var selectExprEventTypeRegistry = new SelectExprEventTypeRegistry("abc", new StatementEventTypeRefImpl());
            var supportTypes = new SupportStreamTypeSvc3Stream();

            _processor = SelectExprJoinWildcardProcessorFactory.Create(Collections.GetEmptyList <int>(), 1, "stmtname", supportTypes.StreamNames, supportTypes.EventTypes,
                                                                       SupportEventAdapterService.Service, null, selectExprEventTypeRegistry, null, null, new Configuration(), new TableServiceImpl(), "default");
        }
Example #4
0
 public void SetUp()
 {
     _container = SupportContainer.Reset();
     _statementResultService = new StatementResultServiceImpl(
         "name", null, null, new ThreadingServiceImpl(new ConfigurationEngineDefaults.ThreadingConfig()),
         _container.ThreadLocalManager());
     _selectExprEventTypeRegistry = new SelectExprEventTypeRegistry(
         "abc", new StatementEventTypeRefImpl(_container.RWLockManager()));
 }
        public void SetUp()
        {
            var selectExprEventTypeRegistry = new SelectExprEventTypeRegistry("abc", new StatementEventTypeRefImpl());
            var statementContext            = SupportStatementContextFactory.MakeContext();

            var factory = new SelectExprProcessorHelper(
                Collections.GetEmptyList <int>(), SupportSelectExprFactory.MakeNoAggregateSelectList(),
                Collections.GetEmptyList <SelectExprStreamDesc>(), null, null, false,
                new SupportStreamTypeSvc1Stream(), SupportEventAdapterService.Service, null,
                selectExprEventTypeRegistry, statementContext.EngineImportService, 1, "stmtname", null,
                new Configuration(), null, new TableServiceImpl(), null);

            _selectExprProcessor = factory.Evaluator;
            _orderByProcessor    = null;

            var prototype = new ResultSetProcessorSimpleFactory(_selectExprProcessor, null, true, null, false, null, 1);

            _outputProcessorAll = (ResultSetProcessorSimple)prototype.Instantiate(null, null, null);
        }
Example #6
0
        public static SelectExprProcessor Create(
            ICollection <int> assignedTypeNumberStack,
            int statementId,
            string statementName,
            string[] streamNames,
            EventType[] streamTypes,
            EventAdapterService eventAdapterService,
            InsertIntoDesc insertIntoDesc,
            SelectExprEventTypeRegistry selectExprEventTypeRegistry,
            EngineImportService engineImportService,
            Attribute[] annotations,
            ConfigurationInformation configuration,
            TableService tableService,
            string engineURI)

        {
            if ((streamNames.Length < 2) || (streamTypes.Length < 2) || (streamNames.Length != streamTypes.Length))
            {
                throw new ArgumentException(
                          "Stream names and types parameter length is invalid, expected use of this class is for join statements");
            }

            // Create EventType of result join events
            var  selectProperties   = new LinkedHashMap <string, Object>();
            var  streamTypesWTables = new EventType[streamTypes.Length];
            bool hasTables          = false;

            for (int i = 0; i < streamTypes.Length; i++)
            {
                streamTypesWTables[i] = streamTypes[i];
                string tableName = TableServiceUtil.GetTableNameFromEventType(streamTypesWTables[i]);
                if (tableName != null)
                {
                    hasTables             = true;
                    streamTypesWTables[i] = tableService.GetTableMetadata(tableName).PublicEventType;
                }
                selectProperties.Put(streamNames[i], streamTypesWTables[i]);
            }

            // If we have a name for this type, add it
            EventUnderlyingType representation = EventRepresentationUtil.GetRepresentation(
                annotations, configuration, AssignedType.NONE);
            EventType resultEventType;

            SelectExprProcessor processor = null;

            if (insertIntoDesc != null)
            {
                EventType existingType = eventAdapterService.GetEventTypeByName(insertIntoDesc.EventTypeName);
                if (existingType != null)
                {
                    processor = SelectExprInsertEventBeanFactory.GetInsertUnderlyingJoinWildcard(
                        eventAdapterService, existingType, streamNames, streamTypesWTables, engineImportService,
                        statementName, engineURI);
                }
            }

            if (processor == null)
            {
                if (insertIntoDesc != null)
                {
                    try
                    {
                        if (representation == EventUnderlyingType.MAP)
                        {
                            resultEventType = eventAdapterService.AddNestableMapType(
                                insertIntoDesc.EventTypeName, selectProperties, null, false, false, false, false, true);
                        }
                        else if (representation == EventUnderlyingType.OBJECTARRAY)
                        {
                            resultEventType = eventAdapterService.AddNestableObjectArrayType(
                                insertIntoDesc.EventTypeName, selectProperties, null, false, false, false, false, true,
                                false, null);
                        }
                        else if (representation == EventUnderlyingType.AVRO)
                        {
                            resultEventType = eventAdapterService.AddAvroType(
                                insertIntoDesc.EventTypeName, selectProperties, false, false, false, false, true,
                                annotations, null, statementName, engineURI);
                        }
                        else
                        {
                            throw new IllegalStateException("Unrecognized code " + representation);
                        }
                        selectExprEventTypeRegistry.Add(resultEventType);
                    }
                    catch (EventAdapterException ex)
                    {
                        throw new ExprValidationException(ex.Message, ex);
                    }
                }
                else
                {
                    if (representation == EventUnderlyingType.MAP)
                    {
                        resultEventType =
                            eventAdapterService.CreateAnonymousMapType(
                                statementId + "_join_" + CollectionUtil.ToString(assignedTypeNumberStack, "_"),
                                selectProperties, true);
                    }
                    else if (representation == EventUnderlyingType.OBJECTARRAY)
                    {
                        resultEventType =
                            eventAdapterService.CreateAnonymousObjectArrayType(
                                statementId + "_join_" + CollectionUtil.ToString(assignedTypeNumberStack, "_"),
                                selectProperties);
                    }
                    else if (representation == EventUnderlyingType.AVRO)
                    {
                        resultEventType =
                            eventAdapterService.CreateAnonymousAvroType(
                                statementId + "_join_" + CollectionUtil.ToString(assignedTypeNumberStack, "_"),
                                selectProperties, annotations, statementName, engineURI);
                    }
                    else
                    {
                        throw new IllegalStateException("Unrecognized enum " + representation);
                    }
                }
                if (resultEventType is ObjectArrayEventType)
                {
                    processor = new SelectExprJoinWildcardProcessorObjectArray(
                        streamNames, resultEventType, eventAdapterService);
                }
                else if (resultEventType is MapEventType)
                {
                    processor = new SelectExprJoinWildcardProcessorMap(
                        streamNames, resultEventType, eventAdapterService);
                }
                else if (resultEventType is AvroSchemaEventType)
                {
                    processor = eventAdapterService.EventAdapterAvroHandler.GetOutputFactory().MakeJoinWildcard(
                        streamNames, resultEventType, eventAdapterService);
                }
            }

            if (!hasTables)
            {
                return(processor);
            }
            return(new SelectExprJoinWildcardProcessorTableRows(streamTypes, processor, tableService));
        }
Example #7
0
        /// <summary>
        /// Returns the processor to use for a given select-clause.
        /// </summary>
        /// <param name="assignedTypeNumberStack">The assigned type number stack.</param>
        /// <param name="selectionList">the list of select clause elements/items, which are expected to have been validated</param>
        /// <param name="isUsingWildcard">true if the wildcard (*) occurs in the select clause</param>
        /// <param name="insertIntoDesc">contains column names for the optional insert-into clause (if supplied)</param>
        /// <param name="optionalInsertIntoEventType">Type of the optional insert into event.</param>
        /// <param name="forClauseSpec">For clause spec.</param>
        /// <param name="typeService">serves stream type information</param>
        /// <param name="eventAdapterService">for generating wrapper instances for events</param>
        /// <param name="statementResultService">handles listeners/subscriptions awareness to reduce output result generation</param>
        /// <param name="valueAddEventService">service that handles update events and variant events</param>
        /// <param name="selectExprEventTypeRegistry">registry for event type to statements</param>
        /// <param name="engineImportService"></param>
        /// <param name="exprEvaluatorContext">context for expression evalauation</param>
        /// <param name="variableService">The variable service.</param>
        /// <param name="scriptingService">The scripting service.</param>
        /// <param name="tableService">The table service.</param>
        /// <param name="timeProvider">The time provider.</param>
        /// <param name="engineURI">The engine URI.</param>
        /// <param name="statementId">The statement identifier.</param>
        /// <param name="statementName">Name of the statement.</param>
        /// <param name="annotations">The annotations.</param>
        /// <param name="contextDescriptor">The context descriptor.</param>
        /// <param name="configuration">The configuration.</param>
        /// <param name="selectExprProcessorCallback">The select expr processor callback.</param>
        /// <param name="namedWindowMgmtService">The named window service.</param>
        /// <param name="intoTableClause">The into table clause.</param>
        /// <param name="groupByRollupInfo"></param>
        /// <param name="statementExtensionSvcContext"></param>
        /// <returns>
        /// select-clause expression processor
        /// </returns>
        /// <exception cref="ExprValidationException">Expected any of the  + Arrays.ToString(ForClauseKeyword.Values()).ToLowerCase() +  for-clause keywords after reserved keyword 'for'
        /// or
        /// The for-clause with the  + ForClauseKeyword.GROUPED_DELIVERY.Name +  keyword requires one or more grouping expressions
        /// or
        /// The for-clause with the  + ForClauseKeyword.DISCRETE_DELIVERY.Name +  keyword does not allow grouping expressions
        /// or
        /// The for-clause with delivery keywords may only occur once in a statement
        /// or
        /// Expected any of the  + Arrays.ToString(ForClauseKeyword.Values()).ToLowerCase() +  for-clause keywords after reserved keyword 'for'</exception>
        /// <throws>ExprValidationException to indicate the select expression cannot be validated</throws>
        public static SelectExprProcessor GetProcessor(
            ICollection <int> assignedTypeNumberStack,
            SelectClauseElementCompiled[] selectionList,
            bool isUsingWildcard,
            InsertIntoDesc insertIntoDesc,
            EventType optionalInsertIntoEventType,
            ForClauseSpec forClauseSpec,
            StreamTypeService typeService,
            EventAdapterService eventAdapterService,
            StatementResultService statementResultService,
            ValueAddEventService valueAddEventService,
            SelectExprEventTypeRegistry selectExprEventTypeRegistry,
            EngineImportService engineImportService,
            ExprEvaluatorContext exprEvaluatorContext,
            VariableService variableService,
            ScriptingService scriptingService,
            TableService tableService,
            TimeProvider timeProvider,
            string engineURI,
            int statementId,
            string statementName,
            Attribute[] annotations,
            ContextDescriptor contextDescriptor,
            ConfigurationInformation configuration,
            SelectExprProcessorDeliveryCallback selectExprProcessorCallback,
            NamedWindowMgmtService namedWindowMgmtService,
            IntoTableSpec intoTableClause,
            GroupByRollupInfo groupByRollupInfo,
            StatementExtensionSvcContext statementExtensionSvcContext)
        {
            if (selectExprProcessorCallback != null)
            {
                var bindProcessor = new BindProcessor(selectionList, typeService.EventTypes, typeService.StreamNames, tableService);
                IDictionary <string, object> properties = new LinkedHashMap <string, object>();
                for (var i = 0; i < bindProcessor.ColumnNamesAssigned.Length; i++)
                {
                    properties.Put(bindProcessor.ColumnNamesAssigned[i], bindProcessor.ExpressionTypes[i]);
                }
                var eventType = eventAdapterService.CreateAnonymousObjectArrayType("Output_" + statementName, properties);
                return(new SelectExprProcessorWDeliveryCallback(eventType, bindProcessor, selectExprProcessorCallback));
            }

            var synthetic = GetProcessorInternal(
                assignedTypeNumberStack, selectionList, isUsingWildcard, insertIntoDesc, optionalInsertIntoEventType,
                typeService, eventAdapterService, valueAddEventService, selectExprEventTypeRegistry,
                engineImportService, statementId, statementName, annotations, configuration, namedWindowMgmtService, tableService,
                groupByRollupInfo);

            // Handle table as an optional service
            if (statementResultService != null)
            {
                // Handle for-clause delivery contract checking
                ExprNode[] groupedDeliveryExpr = null;
                var        forDelivery         = false;
                if (forClauseSpec != null)
                {
                    foreach (var item in forClauseSpec.Clauses)
                    {
                        if (item.Keyword == null)
                        {
                            throw new ExprValidationException("Expected any of the " + EnumHelper.GetValues <ForClauseKeyword>().Render().ToLower() + " for-clause keywords after reserved keyword 'for'");
                        }
                        try
                        {
                            ForClauseKeyword keyword = EnumHelper.Parse <ForClauseKeyword>(item.Keyword);
                            if ((keyword == ForClauseKeyword.GROUPED_DELIVERY) && (item.Expressions.IsEmpty()))
                            {
                                throw new ExprValidationException(
                                          "The for-clause with the " + ForClauseKeyword.GROUPED_DELIVERY.GetName() +
                                          " keyword requires one or more grouping expressions");
                            }
                            if ((keyword == ForClauseKeyword.DISCRETE_DELIVERY) && (!item.Expressions.IsEmpty()))
                            {
                                throw new ExprValidationException(
                                          "The for-clause with the " + ForClauseKeyword.DISCRETE_DELIVERY.GetName() +
                                          " keyword does not allow grouping expressions");
                            }
                            if (forDelivery)
                            {
                                throw new ExprValidationException(
                                          "The for-clause with delivery keywords may only occur once in a statement");
                            }
                        }
                        catch (ExprValidationException)
                        {
                            throw;
                        }
                        catch (EPException)
                        {
                            throw;
                        }
                        catch (Exception ex)
                        {
                            throw new ExprValidationException("Expected any of the " + EnumHelper.GetValues <ForClauseKeyword>().Render().ToLower() + " for-clause keywords after reserved keyword 'for'", ex);
                        }

                        StreamTypeService type = new StreamTypeServiceImpl(synthetic.ResultEventType, null, false, engineURI);
                        groupedDeliveryExpr = new ExprNode[item.Expressions.Count];
                        var validationContext = new ExprValidationContext(type, engineImportService, statementExtensionSvcContext, null, timeProvider, variableService, tableService, exprEvaluatorContext, eventAdapterService, statementName, statementId, annotations, null, scriptingService, false, false, true, false, intoTableClause == null ? null : intoTableClause.Name, false);  // no context descriptor available
                        for (var i = 0; i < item.Expressions.Count; i++)
                        {
                            groupedDeliveryExpr[i] = ExprNodeUtility.GetValidatedSubtree(ExprNodeOrigin.FORCLAUSE, item.Expressions[i], validationContext);
                        }
                        forDelivery = true;
                    }
                }

                var bindProcessor = new BindProcessor(selectionList, typeService.EventTypes, typeService.StreamNames, tableService);
                statementResultService.SetSelectClause(bindProcessor.ExpressionTypes, bindProcessor.ColumnNamesAssigned, forDelivery, ExprNodeUtility.GetEvaluators(groupedDeliveryExpr), exprEvaluatorContext);
                return(new SelectExprResultProcessor(statementResultService, synthetic, bindProcessor));
            }

            return(synthetic);
        }
Example #8
0
        private static SelectExprProcessor GetProcessorInternal(
            ICollection <int> assignedTypeNumberStack,
            SelectClauseElementCompiled[] selectionList,
            bool isUsingWildcard,
            InsertIntoDesc insertIntoDesc,
            EventType optionalInsertIntoEventType,
            StreamTypeService typeService,
            EventAdapterService eventAdapterService,
            ValueAddEventService valueAddEventService,
            SelectExprEventTypeRegistry selectExprEventTypeRegistry,
            EngineImportService engineImportService,
            int statementId,
            string statementName,
            Attribute[] annotations,
            ConfigurationInformation configuration,
            NamedWindowMgmtService namedWindowMgmtService,
            TableService tableService,
            GroupByRollupInfo groupByRollupInfo)
        {
            // Wildcard not allowed when insert into specifies column order
            if (isUsingWildcard && insertIntoDesc != null && !insertIntoDesc.ColumnNames.IsEmpty())
            {
                throw new ExprValidationException("Wildcard not allowed when insert-into specifies column order");
            }

            // Determine wildcard processor (select *)
            if (IsWildcardsOnly(selectionList))
            {
                // For joins
                if (typeService.StreamNames.Length > 1)
                {
                    Log.Debug(".getProcessor Using SelectExprJoinWildcardProcessor");
                    return(SelectExprJoinWildcardProcessorFactory.Create(
                               assignedTypeNumberStack, statementId, statementName,
                               typeService.StreamNames, typeService.EventTypes,
                               eventAdapterService, insertIntoDesc, selectExprEventTypeRegistry, engineImportService,
                               annotations, configuration, tableService, typeService.EngineURIQualifier));
                }
                // Single-table selects with no insert-into
                // don't need extra processing
                else if (insertIntoDesc == null)
                {
                    Log.Debug(".getProcessor Using wildcard processor");
                    if (typeService.HasTableTypes)
                    {
                        var tableName = TableServiceUtil.GetTableNameFromEventType(typeService.EventTypes[0]);
                        return(new SelectExprWildcardTableProcessor(tableName, tableService));
                    }
                    return(new SelectExprWildcardProcessor(typeService.EventTypes[0]));
                }
            }

            // Verify the assigned or name used is unique
            if (insertIntoDesc == null)
            {
                VerifyNameUniqueness(selectionList);
            }

            // Construct processor
            var buckets = GetSelectExpressionBuckets(selectionList);

            var factory = new SelectExprProcessorHelper(
                assignedTypeNumberStack, buckets.Expressions, buckets.SelectedStreams, insertIntoDesc,
                optionalInsertIntoEventType, isUsingWildcard, typeService, eventAdapterService, valueAddEventService,
                selectExprEventTypeRegistry, engineImportService, statementId, statementName, annotations, configuration,
                namedWindowMgmtService, tableService, groupByRollupInfo);
            SelectExprProcessor processor = factory.Evaluator;

            // add reference to the type obtained
            var type = (EventTypeSPI)processor.ResultEventType;

            if (!typeService.IsOnDemandStreams && type.Metadata.TypeClass != TypeClass.ANONYMOUS)
            {
                selectExprEventTypeRegistry.Add(processor.ResultEventType);
            }
            return(processor);
        }
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="assignedTypeNumberStack">The assigned type number stack.</param>
        /// <param name="statementId">The statement identifier.</param>
        /// <param name="streamNames">name of each stream</param>
        /// <param name="streamTypes">type of each stream</param>
        /// <param name="eventAdapterService">service for generating events and handling event types</param>
        /// <param name="insertIntoDesc">describes the insert-into clause</param>
        /// <param name="selectExprEventTypeRegistry">registry for event type to statements</param>
        /// <param name="methodResolutionService">for resolving writable properties</param>
        /// <param name="annotations">The annotations.</param>
        /// <param name="configuration">The configuration.</param>
        /// <param name="tableService">The table service.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentException">Stream names and types parameter length is invalid, expected use of this class is for join statements</exception>
        /// <exception cref="ExprValidationException"></exception>
        /// <throws>com.espertech.esper.epl.expression.core.ExprValidationException if the expression validation failed</throws>
        public static SelectExprProcessor Create(
            ICollection <int> assignedTypeNumberStack,
            string statementId,
            string[] streamNames,
            EventType[] streamTypes,
            EventAdapterService eventAdapterService,
            InsertIntoDesc insertIntoDesc,
            SelectExprEventTypeRegistry selectExprEventTypeRegistry,
            MethodResolutionService methodResolutionService,
            Attribute[] annotations,
            ConfigurationInformation configuration,
            TableService tableService)
        {
            if ((streamNames.Length < 2) || (streamTypes.Length < 2) || (streamNames.Length != streamTypes.Length))
            {
                throw new ArgumentException(
                          "Stream names and types parameter length is invalid, expected use of this class is for join statements");
            }

            // Create EventType of result join events
            var eventTypeMap       = new LinkedHashMap <string, object>();
            var streamTypesWTables = new EventType[streamTypes.Length];
            var hasTables          = false;

            for (var i = 0; i < streamTypes.Length; i++)
            {
                streamTypesWTables[i] = streamTypes[i];
                var tableName = TableServiceUtil.GetTableNameFromEventType(streamTypesWTables[i]);
                if (tableName != null)
                {
                    hasTables             = true;
                    streamTypesWTables[i] = tableService.GetTableMetadata(tableName).PublicEventType;
                }
                eventTypeMap.Put(streamNames[i], streamTypesWTables[i]);
            }

            // If we have a name for this type, add it
            var       useMap = EventRepresentationUtil.IsMap(annotations, configuration, AssignedType.NONE);
            EventType resultEventType;

            SelectExprProcessor processor = null;

            if (insertIntoDesc != null)
            {
                EventType existingType = eventAdapterService.GetEventTypeByName(insertIntoDesc.EventTypeName);
                if (existingType != null)
                {
                    processor = SelectExprInsertEventBeanFactory.GetInsertUnderlyingJoinWildcard(
                        eventAdapterService, existingType, streamNames, streamTypesWTables,
                        methodResolutionService.EngineImportService);
                }
            }

            if (processor == null)
            {
                if (insertIntoDesc != null)
                {
                    try
                    {
                        if (useMap)
                        {
                            resultEventType = eventAdapterService.AddNestableMapType(
                                insertIntoDesc.EventTypeName, eventTypeMap, null, false, false, false, false, true);
                        }
                        else
                        {
                            resultEventType = eventAdapterService.AddNestableObjectArrayType(
                                insertIntoDesc.EventTypeName, eventTypeMap, null, false, false, false, false, true, false, null);
                        }
                        selectExprEventTypeRegistry.Add(resultEventType);
                    }
                    catch (EventAdapterException ex)
                    {
                        throw new ExprValidationException(ex.Message);
                    }
                }
                else
                {
                    if (useMap)
                    {
                        resultEventType =
                            eventAdapterService.CreateAnonymousMapType(
                                statementId + "_join_" + CollectionUtil.ToString(assignedTypeNumberStack, "_"), eventTypeMap);
                    }
                    else
                    {
                        resultEventType =
                            eventAdapterService.CreateAnonymousObjectArrayType(
                                statementId + "_join_" + CollectionUtil.ToString(assignedTypeNumberStack, "_"), eventTypeMap);
                    }
                }
                if (resultEventType is ObjectArrayEventType)
                {
                    processor = new SelectExprJoinWildcardProcessorObjectArray(
                        streamNames, resultEventType, eventAdapterService);
                }
                else
                {
                    processor = new SelectExprJoinWildcardProcessorMap(streamNames, resultEventType, eventAdapterService);
                }
            }

            if (!hasTables)
            {
                return(processor);
            }
            return(new SelectExprJoinWildcardProcessorTableRows(streamTypes, processor, tableService));
        }