public SelectExprProcessorForgeWForgables( SelectExprProcessorForge forge, IList<StmtClassForgeableFactory> additionalForgeables) { Forge = forge; AdditionalForgeables = additionalForgeables; }
public BindSelectExprProcessorForge( SelectExprProcessorForge syntheticProcessorForge, BindProcessorForge bindProcessorForge) { this.syntheticProcessorForge = syntheticProcessorForge; this.bindProcessorForge = bindProcessorForge; }
public SelectExprProcessorDescriptor( SelectSubscriberDescriptor subscriberDescriptor, SelectExprProcessorForge forge, IList<StmtClassForgeableFactory> additionalForgeables) { SubscriberDescriptor = subscriberDescriptor; Forge = forge; AdditionalForgeables = additionalForgeables; }
public ResultSetProcessorHandThroughFactoryForge( EventType resultEventType, SelectExprProcessorForge selectExprProcessorForge, bool selectRStream) { ResultEventType = resultEventType; this.selectExprProcessorForge = selectExprProcessorForge; IsSelectRStream = selectRStream; }
public SelectEvalWildcardJoin( SelectExprForgeContext selectExprForgeContext, EventType resultEventType, SelectExprProcessorForge joinWildcardProcessorForge) : base(selectExprForgeContext, resultEventType) { this.joinWildcardProcessorForge = joinWildcardProcessorForge; }
public SelectExprProcessorWInsertTarget( SelectExprProcessorForge forge, EventType insertIntoTargetType, IList<StmtClassForgeableFactory> additionalForgeables) { Forge = forge; InsertIntoTargetType = insertIntoTargetType; AdditionalForgeables = additionalForgeables; }
private static SelectExprProcessorWInsertTarget GetProcessorInternal( SelectProcessorArgs args, InsertIntoDesc insertIntoDesc) { // Wildcard not allowed when insert into specifies column order if (args.IsUsingWildcard && insertIntoDesc != null && !insertIntoDesc.ColumnNames.IsEmpty()) { throw new ExprValidationException("Wildcard not allowed when insert-into specifies column order"); } var insertIntoTarget = insertIntoDesc == null ? null : args.EventTypeCompileTimeResolver.GetTypeByName(insertIntoDesc.EventTypeName); // Determine wildcard processor (select *) if (IsWildcardsOnly(args.SelectionList)) { // For joins if (args.TypeService.StreamNames.Length > 1 && !(insertIntoTarget is VariantEventType)) { Log.Debug(".getProcessor Using SelectExprJoinWildcardProcessor"); SelectExprProcessorForgeWForgables pair = SelectExprJoinWildcardProcessorFactory.Create(args, insertIntoDesc, eventTypeName => eventTypeName); SelectExprProcessorForge forgeX = pair.Forge; return new SelectExprProcessorWInsertTarget(forgeX, null, pair.AdditionalForgeables); } if (insertIntoDesc == null) { // Single-table selects with no insert-into // don't need extra processing Log.Debug(".getProcessor Using wildcard processor"); if (args.TypeService.HasTableTypes) { var table = args.TableCompileTimeResolver.ResolveTableFromEventType( args.TypeService.EventTypes[0]); if (table != null) { SelectExprProcessorForge forgeX = new SelectEvalWildcardTable(table); return new SelectExprProcessorWInsertTarget(forgeX, null, EmptyList<StmtClassForgeableFactory>.Instance); } } SelectExprProcessorForge forgeOuter = new SelectEvalWildcardNonJoin(args.TypeService.EventTypes[0]); return new SelectExprProcessorWInsertTarget(forgeOuter, null, EmptyList<StmtClassForgeableFactory>.Instance); } } // Verify the assigned or name used is unique if (insertIntoDesc == null) { VerifyNameUniqueness(args.SelectionList); } // Construct processor var buckets = GetSelectExpressionBuckets(args.SelectionList); var factory = new SelectExprProcessorHelper( buckets.Expressions, buckets.SelectedStreams, args, insertIntoDesc); return factory.Forge; }
public SelectEvalInsertWildcardJoinVariant( SelectExprForgeContext context, EventType resultEventType, SelectExprProcessorForge joinWildcardProcessorForge, VariantEventType variantEventType) : base(context, resultEventType) { this.joinWildcardProcessorForge = joinWildcardProcessorForge; this.variantEventType = variantEventType; }
public SelectEvalJoinWildcardProcessorTableRows( EventType[] types, SelectExprProcessorForge inner, TableCompileTimeResolver tableResolver) { this.types = types; this.innerForge = inner; tables = new TableMetaData[types.Length]; for (int i = 0; i < types.Length; i++) { tables[i] = tableResolver.ResolveTableFromEventType(types[i]); } }
public InfraOnMergeActionInsForge( ExprNode optionalFilter, SelectExprProcessorForge insertHelper, TableMetaData insertIntoTable, bool audit, bool route) : base(optionalFilter) { this.insertHelper = insertHelper; this.insertIntoTable = insertIntoTable; this.audit = audit; this.route = route; }
public ResultSetProcessorSimpleForge( EventType resultEventType, SelectExprProcessorForge selectExprProcessorForge, ExprForge optionalHavingNode, bool isSelectRStream, OutputLimitSpec outputLimitSpec, ResultSetProcessorOutputConditionType? outputConditionType, bool isSorting, EventType[] eventTypes) { ResultEventType = resultEventType; this.selectExprProcessorForge = selectExprProcessorForge; OptionalHavingNode = optionalHavingNode; IsSelectRStream = isSelectRStream; this.outputLimitSpec = outputLimitSpec; OutputConditionType = outputConditionType; IsSorting = isSorting; EventTypes = eventTypes; }
public ResultSetProcessorRowForAllForge( EventType resultEventType, SelectExprProcessorForge selectExprProcessorForge, ExprForge optionalHavingNode, bool isSelectRStream, bool isUnidirectional, bool isHistoricalOnly, OutputLimitSpec outputLimitSpec, bool hasOrderBy, ResultSetProcessorOutputConditionType? outputConditionType) { ResultEventType = resultEventType; this.selectExprProcessorForge = selectExprProcessorForge; OptionalHavingNode = optionalHavingNode; IsSelectRStream = isSelectRStream; IsUnidirectional = isUnidirectional; IsHistoricalOnly = isHistoricalOnly; OutputLimitSpec = outputLimitSpec; IsSorting = hasOrderBy; this.outputConditionType = outputConditionType; }
public BindProcessorForge( SelectExprProcessorForge synthetic, SelectClauseElementCompiled[] selectionList, EventType[] typesPerStream, string[] streamNames, TableCompileTimeResolver tableService) { var expressions = new List<ExprForge>(); var types = new List<Type>(); var columnNames = new List<string>(); foreach (var element in selectionList) { // handle wildcards by outputting each stream's underlying event if (element is SelectClauseElementWildcard) { for (var i = 0; i < typesPerStream.Length; i++) { var returnType = typesPerStream[i].UnderlyingType; var tableMetadata = tableService.ResolveTableFromEventType(typesPerStream[i]); ExprForge forge; if (tableMetadata != null) { forge = new BindProcessorStreamTable(i, returnType, tableMetadata); } else { forge = new BindProcessorStream(i, returnType); } expressions.Add(forge); types.Add(returnType); columnNames.Add(streamNames[i]); } } else if (element is SelectClauseStreamCompiledSpec) { // handle stream wildcards by outputting the stream underlying event var streamSpec = (SelectClauseStreamCompiledSpec) element; var type = typesPerStream[streamSpec.StreamNumber]; var returnType = type.UnderlyingType; var tableMetadata = tableService.ResolveTableFromEventType(type); ExprForge forge; if (tableMetadata != null) { forge = new BindProcessorStreamTable(streamSpec.StreamNumber, returnType, tableMetadata); } else { forge = new BindProcessorStream(streamSpec.StreamNumber, returnType); } expressions.Add(forge); types.Add(returnType); columnNames.Add(streamNames[streamSpec.StreamNumber]); } else if (element is SelectClauseExprCompiledSpec) { // handle expressions var expr = (SelectClauseExprCompiledSpec) element; var forge = expr.SelectExpression.Forge; expressions.Add(forge); types.Add(forge.EvaluationType); if (expr.AssignedName != null) { columnNames.Add(expr.AssignedName); } else { columnNames.Add( ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(expr.SelectExpression)); } } else { throw new IllegalStateException( "Unrecognized select expression element of type " + element.GetType()); } } ExpressionForges = expressions.ToArray(); ExpressionTypes = types.ToArray(); ColumnNamesAssigned = columnNames.ToArray(); }
private static CodegenInnerClass MakeSelectExprProcessor( string className, string classNameParent, CodegenClassScope classScope, SelectExprProcessorForge forge) { var exprSymbol = new ExprForgeCodegenSymbol(true, null); var selectEnv = new SelectExprProcessorCodegenSymbol(); CodegenSymbolProvider symbolProvider = new ProxyCodegenSymbolProvider { ProcProvide = symbols => { exprSymbol.Provide(symbols); selectEnv.Provide(symbols); } }; IList<CodegenTypedParam> members = new List<CodegenTypedParam>(2); members.Add(new CodegenTypedParam(classScope.NamespaceScope.FieldsClassName, NAME_STATEMENT_FIELDS)); members.Add(new CodegenTypedParam(typeof(EventBeanTypedEventFactory), "factory")); IList<CodegenTypedParam> ctorParams = new List<CodegenTypedParam>(2); ctorParams.Add(new CodegenTypedParam(classNameParent, "o")); ctorParams.Add( new CodegenTypedParam( typeof(EPStatementInitServices), EPStatementInitServicesConstants.REF.Ref, false)); var ctor = new CodegenCtor(typeof(StmtClassForgableRSPFactoryProvider), classScope, ctorParams); ctor.Block.AssignRef( NAME_STATEMENT_FIELDS, ExprDotName(Ref("o"), NAME_STATEMENT_FIELDS)); ctor.Block.AssignRef( "factory", ExprDotName(EPStatementInitServicesConstants.REF, "EventBeanTypedEventFactory")); var processMethod = CodegenMethod.MakeMethod( typeof(EventBean), typeof(StmtClassForgableRSPFactoryProvider), symbolProvider, classScope) .AddParam(typeof(EventBean[]), NAME_EPS) .AddParam(typeof(bool), ExprForgeCodegenNames.NAME_ISNEWDATA) .AddParam(typeof(bool), SelectExprProcessorCodegenSymbol.NAME_ISSYNTHESIZE) .AddParam(typeof(ExprEvaluatorContext), NAME_EXPREVALCONTEXT); processMethod.Block.Apply( InstrumentationCode.Instblock( classScope, "qSelectClause", REF_EPS, ResultSetProcessorCodegenNames.REF_ISNEWDATA, REF_ISSYNTHESIZE, REF_EXPREVALCONTEXT)); var performMethod = forge.ProcessCodegen( Ref("o." + MEMBERNAME_RESULTEVENTTYPE), Ref("factory"), processMethod, selectEnv, exprSymbol, classScope); exprSymbol.DerivedSymbolsCodegen(processMethod, processMethod.Block, classScope); processMethod.Block .DeclareVar<EventBean>("@out", LocalMethod(performMethod)) .Apply( InstrumentationCode.Instblock( classScope, "aSelectClause", ResultSetProcessorCodegenNames.REF_ISNEWDATA, Ref("@out"), ConstantNull())) .MethodReturn(Ref("@out")); var allProperties = new CodegenClassProperties(); var allMethods = new CodegenClassMethods(); CodegenStackGenerator.RecursiveBuildStack( processMethod, "Process", allMethods, allProperties); return new CodegenInnerClass( className, typeof(SelectExprProcessor), ctor, members, allMethods, allProperties); }
public ListenerOnlySelectExprProcessorForge(SelectExprProcessorForge syntheticProcessorForge) { this.syntheticProcessorForge = syntheticProcessorForge; }
public static CodegenExpression MakeAnonymous( SelectExprProcessorForge insertHelper, CodegenMethod method, CodegenExpressionRef initSvc, CodegenClassScope classScope) { var resultType = classScope.AddDefaultFieldUnshared( true, typeof(EventType), EventTypeUtility.ResolveTypeCodegen(insertHelper.ResultEventType, initSvc)); var eventBeanFactory = classScope.AddOrGetDefaultFieldSharable(EventBeanTypedEventFactoryCodegenField.INSTANCE); var exprSymbol = new ExprForgeCodegenSymbol(true, true); var selectEnv = new SelectExprProcessorCodegenSymbol(); CodegenSymbolProvider symbolProvider = new ProxyCodegenSymbolProvider { ProcProvide = symbols => { exprSymbol.Provide(symbols); selectEnv.Provide(symbols); } }; var processMethod = method .MakeChildWithScope(typeof(EventBean), typeof(SelectExprProcessorUtil), symbolProvider, classScope) .AddParam(typeof(EventBean[]), NAME_EPS) .AddParam(typeof(bool), ExprForgeCodegenNames.NAME_ISNEWDATA) .AddParam(typeof(bool), SelectExprProcessorCodegenSymbol.NAME_ISSYNTHESIZE) .AddParam(typeof(ExprEvaluatorContext), NAME_EXPREVALCONTEXT); //var anonymousSelect = NewAnonymousClass(method.Block, typeof(ProxySelectExprProcessor)); //var processMethod = CodegenMethod.MakeMethod( // typeof(EventBean), // typeof(SelectExprProcessorUtil), // symbolProvider, // classScope) // .AddParam(typeof(EventBean[]), NAME_EPS) // .AddParam(typeof(bool), ExprForgeCodegenNames.NAME_ISNEWDATA) // .AddParam(typeof(bool), SelectExprProcessorCodegenSymbol.NAME_ISSYNTHESIZE) // .AddParam(typeof(ExprEvaluatorContext), NAME_EXPREVALCONTEXT); //anonymousSelect.AddMethod("Process", processMethod); processMethod.Block.Apply( Instblock( classScope, "qSelectClause", REF_EPS, ResultSetProcessorCodegenNames.REF_ISNEWDATA, REF_ISSYNTHESIZE, REF_EXPREVALCONTEXT)); var performMethod = insertHelper.ProcessCodegen( resultType, eventBeanFactory, processMethod, selectEnv, exprSymbol, classScope); exprSymbol.DerivedSymbolsCodegen(method, processMethod.Block, classScope); //exprSymbol.DerivedSymbolsCodegen(processMethod, processMethod.Block, classScope); processMethod.Block .DeclareVar<EventBean>("result", LocalMethod(performMethod)) .Apply( Instblock( classScope, "aSelectClause", ResultSetProcessorCodegenNames.REF_ISNEWDATA, Ref("result"), ConstantNull())) .MethodReturn(Ref("result")); var processLambda = new CodegenExpressionLambda(method.Block) .WithParam(typeof(EventBean[]), NAME_EPS) .WithParam(typeof(bool), ExprForgeCodegenNames.NAME_ISNEWDATA) .WithParam(typeof(bool), SelectExprProcessorCodegenSymbol.NAME_ISSYNTHESIZE) .WithParam(typeof(ExprEvaluatorContext), NAME_EXPREVALCONTEXT) .WithBody( block => { block.DebugStack(); block.BlockReturn( LocalMethod( processMethod, ExprForgeCodegenNames.REF_EPS, ExprForgeCodegenNames.REF_ISNEWDATA, SelectExprProcessorCodegenSymbol.REF_ISSYNTHESIZE, ExprForgeCodegenNames.REF_EXPREVALCONTEXT)); }); var anonymousSelect = NewInstance<ProxySelectExprProcessor>(processLambda); return anonymousSelect; }
protected override void InitExec( string aliasName, StatementSpecCompiled spec, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { var selectNoWildcard = InfraOnMergeHelperForge.CompileSelectNoWildcard( UuidGenerator.Generate(), Arrays.AsList(spec.SelectClauseCompiled.SelectExprList)); StreamTypeService streamTypeService = new StreamTypeServiceImpl(true); // assign names var validationContext = new ExprValidationContextBuilder(streamTypeService, statementRawInfo, services) .WithAllowBindingConsumption(true) .Build(); // determine whether column names are provided // if the "values" keyword was used, allow sequential automatic name assignment string[] assignedSequentialNames = null; if (spec.Raw.InsertIntoDesc.ColumnNames.IsEmpty()) { var insert = (FireAndForgetSpecInsert) spec.Raw.FireAndForgetSpec; if (insert.IsUseValuesKeyword) { assignedSequentialNames = processor.EventTypePublic.PropertyNames; } } var count = -1; foreach (var compiled in spec.SelectClauseCompiled.SelectExprList) { count++; if (compiled is SelectClauseExprCompiledSpec) { var expr = (SelectClauseExprCompiledSpec) compiled; var validatedExpression = ExprNodeUtilityValidate.GetValidatedSubtree( ExprNodeOrigin.SELECT, expr.SelectExpression, validationContext); expr.SelectExpression = validatedExpression; if (expr.AssignedName == null) { if (expr.ProvidedName == null) { if (assignedSequentialNames != null && count < assignedSequentialNames.Length) { expr.AssignedName = assignedSequentialNames[count]; } else { expr.AssignedName = ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(expr.SelectExpression); } } else { expr.AssignedName = expr.ProvidedName; } } } } EventType optionalInsertIntoEventType = processor.EventTypeRspInputEvents; var args = new SelectProcessorArgs( selectNoWildcard.ToArray(), null, false, optionalInsertIntoEventType, null, streamTypeService, statementRawInfo.OptionalContextDescriptor, true, spec.Annotations, statementRawInfo, services); insertHelper = SelectExprProcessorFactory.GetProcessor(args, spec.Raw.InsertIntoDesc, false).Forge; }
private InfraOnMergeActionInsForge SetupInsert( string infraName, EventType infraType, OnTriggerMergeActionInsert desc, EventType triggeringEventType, string triggeringStreamName, StatementRawInfo statementRawInfo, StatementCompileTimeServices services, bool isTable) { // Compile insert-into info var streamName = desc.OptionalStreamName != null ? desc.OptionalStreamName : infraName; InsertIntoDesc insertIntoDesc = InsertIntoDesc.FromColumns(streamName, desc.Columns); // rewrite any wildcards to use "stream.wildcard" if (triggeringStreamName == null) { triggeringStreamName = UuidGenerator.Generate(); } var selectNoWildcard = CompileSelectNoWildcard(triggeringStreamName, desc.SelectClauseCompiled); // Set up event types for select-clause evaluation: The first type does not contain anything as its the named-window or table row which is not present for insert var eventTypeMetadata = new EventTypeMetadata( "merge_infra_insert", statementRawInfo.ModuleName, EventTypeTypeClass.STREAM, EventTypeApplicationType.MAP, NameAccessModifier.TRANSIENT, EventTypeBusModifier.NONBUS, false, EventTypeIdPair.Unassigned()); EventType dummyTypeNoProperties = BaseNestableEventUtil.MakeMapTypeCompileTime( eventTypeMetadata, Collections.GetEmptyMap<string, object>(), null, null, null, null, services.BeanEventTypeFactoryPrivate, services.EventTypeCompileTimeResolver); var eventTypes = new EventType[] {dummyTypeNoProperties, triggeringEventType}; var streamNames = new string[] {UuidGenerator.Generate(), triggeringStreamName}; StreamTypeService streamTypeService = new StreamTypeServiceImpl( eventTypes, streamNames, new bool[eventTypes.Length], false, false); // Get select expr processor var selectClause = selectNoWildcard.ToArray(); var args = new SelectProcessorArgs( selectClause, null, false, null, null, streamTypeService, null, false, statementRawInfo.Annotations, statementRawInfo, services); if (isTable && streamName.Equals(infraName)) { args.OptionalInsertIntoEventType = infraType; } SelectExprProcessorForge insertHelperForge = SelectExprProcessorFactory.GetProcessor(args, insertIntoDesc, false).Forge; ExprNode filterEval = desc.OptionalWhereClause; var route = !streamName.Equals(infraName); bool audit = AuditEnum.INSERT.GetAudit(statementRawInfo.Annotations) != null; TableMetaData insertIntoTable = services.TableCompileTimeResolver.Resolve(insertIntoDesc.EventTypeName); return new InfraOnMergeActionInsForge(filterEval, insertHelperForge, insertIntoTable, audit, route); }
public static SelectExprProcessorForgeWForgables Create( SelectProcessorArgs args, InsertIntoDesc insertIntoDesc, Func<String, String> eventTypeNamePostfix) { var streamNames = args.TypeService.StreamNames; var streamTypes = args.TypeService.EventTypes; var moduleName = args.ModuleName; var additionalForgeables = new List<StmtClassForgeableFactory>(); 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]; var hasTables = false; for (var i = 0; i < streamTypes.Length; i++) { streamTypesWTables[i] = streamTypes[i]; var table = args.TableCompileTimeResolver.ResolveTableFromEventType(streamTypesWTables[i]); if (table != null) { hasTables = true; streamTypesWTables[i] = table.PublicEventType; } selectProperties.Put(streamNames[i], streamTypesWTables[i]); } // If we have a name for this type, add it var representation = EventRepresentationUtil.GetRepresentation( args.Annotations, args.Configuration, AssignedType.NONE); EventType resultEventType; SelectExprProcessorForge processor = null; if (insertIntoDesc != null) { var existingType = args.EventTypeCompileTimeResolver.GetTypeByName(insertIntoDesc.EventTypeName); if (existingType != null) { processor = SelectExprInsertEventBeanFactory.GetInsertUnderlyingJoinWildcard( existingType, streamNames, streamTypesWTables, args.ImportService, args.StatementName, args.EventTypeAvroHandler); } } if (processor == null) { if (insertIntoDesc != null) { var eventTypeName = eventTypeNamePostfix.Invoke(insertIntoDesc.EventTypeName); var visibility = args.CompileTimeServices.ModuleVisibilityRules.GetAccessModifierEventType( args.StatementRawInfo, eventTypeName); var metadata = new Func<EventTypeApplicationType, EventTypeMetadata>( apptype => new EventTypeMetadata( eventTypeName, moduleName, EventTypeTypeClass.STREAM, apptype, visibility, EventTypeBusModifier.NONBUS, false, EventTypeIdPair.Unassigned())); if (representation == EventUnderlyingType.MAP) { IDictionary<string, object> propertyTypes = EventTypeUtility.GetPropertyTypesNonPrimitive(selectProperties); resultEventType = BaseNestableEventUtil.MakeMapTypeCompileTime( metadata.Invoke(EventTypeApplicationType.MAP), propertyTypes, null, null, null, null, args.BeanEventTypeFactoryPrivate, args.EventTypeCompileTimeResolver); } else if (representation == EventUnderlyingType.OBJECTARRAY) { IDictionary<string, object> propertyTypes = EventTypeUtility.GetPropertyTypesNonPrimitive(selectProperties); resultEventType = BaseNestableEventUtil.MakeOATypeCompileTime( metadata.Invoke(EventTypeApplicationType.OBJECTARR), propertyTypes, null, null, null, null, args.BeanEventTypeFactoryPrivate, args.EventTypeCompileTimeResolver); } else if (representation == EventUnderlyingType.AVRO) { resultEventType = args.EventTypeAvroHandler.NewEventTypeFromNormalized( metadata.Invoke(EventTypeApplicationType.AVRO), args.EventTypeCompileTimeResolver, EventBeanTypedEventFactoryCompileTime.INSTANCE, selectProperties, args.Annotations, null, null, null, args.StatementName); } else if (representation == EventUnderlyingType.JSON) { EventTypeForgeablesPair pair = JsonEventTypeUtility.MakeJsonTypeCompileTimeNewType( metadata.Invoke(EventTypeApplicationType.JSON), selectProperties, null, null, args.StatementRawInfo, args.CompileTimeServices); resultEventType = pair.EventType; additionalForgeables.AddAll(pair.AdditionalForgeables); } else { throw new IllegalStateException("Unrecognized code " + representation); } args.EventTypeCompileTimeRegistry.NewType(resultEventType); } else { var eventTypeName = eventTypeNamePostfix.Invoke( args.CompileTimeServices.EventTypeNameGeneratorStatement.AnonymousTypeName); IDictionary<string, object> propertyTypes = EventTypeUtility.GetPropertyTypesNonPrimitive(selectProperties); var metadata = new Func<EventTypeApplicationType, EventTypeMetadata>( type => new EventTypeMetadata( eventTypeName, moduleName, EventTypeTypeClass.STATEMENTOUT, type, NameAccessModifier.TRANSIENT, EventTypeBusModifier.NONBUS, false, EventTypeIdPair.Unassigned())); if (representation == EventUnderlyingType.MAP) { resultEventType = BaseNestableEventUtil.MakeMapTypeCompileTime( metadata.Invoke(EventTypeApplicationType.MAP), propertyTypes, null, null, null, null, args.BeanEventTypeFactoryPrivate, args.EventTypeCompileTimeResolver); } else if (representation == EventUnderlyingType.OBJECTARRAY) { resultEventType = BaseNestableEventUtil.MakeOATypeCompileTime( metadata.Invoke(EventTypeApplicationType.OBJECTARR), propertyTypes, null, null, null, null, args.BeanEventTypeFactoryPrivate, args.EventTypeCompileTimeResolver); } else if (representation == EventUnderlyingType.AVRO) { resultEventType = args.EventTypeAvroHandler.NewEventTypeFromNormalized( metadata.Invoke(EventTypeApplicationType.AVRO), args.EventTypeCompileTimeResolver, args.BeanEventTypeFactoryPrivate.EventBeanTypedEventFactory, selectProperties, args.Annotations, null, null, null, args.StatementName); } else if (representation == EventUnderlyingType.JSON) { EventTypeForgeablesPair pair = JsonEventTypeUtility.MakeJsonTypeCompileTimeNewType( metadata.Invoke(EventTypeApplicationType.JSON), propertyTypes, null, null, args.StatementRawInfo, args.CompileTimeServices); resultEventType = pair.EventType; additionalForgeables.AddAll(pair.AdditionalForgeables); } else { throw new IllegalStateException("Unrecognized enum " + representation); } args.EventTypeCompileTimeRegistry.NewType(resultEventType); } // NOTE: Processors herein maintain their own result-event-type as they become inner types, // for example "insert into VariantStream select * from A, B" if (resultEventType is ObjectArrayEventType) { processor = new SelectEvalJoinWildcardProcessorObjectArray(streamNames, resultEventType); } else if (resultEventType is MapEventType) { processor = new SelectEvalJoinWildcardProcessorMap(streamNames, resultEventType); } else if (resultEventType is AvroSchemaEventType) { processor = args.EventTypeAvroHandler.OutputFactory.MakeJoinWildcard(streamNames, resultEventType); } else if (resultEventType is JsonEventType) { processor = new SelectEvalJoinWildcardProcessorJson(streamNames, (JsonEventType) resultEventType); } } if (!hasTables) { return new SelectExprProcessorForgeWForgables(processor, additionalForgeables); } processor = new SelectEvalJoinWildcardProcessorTableRows(streamTypes, processor, args.TableCompileTimeResolver); return new SelectExprProcessorForgeWForgables(processor, additionalForgeables); }