public void ValidateAddExplicitIndex(bool unique, string indexName, IList <CreateIndexItem> columns, EventType eventType, IEnumerable <EventBean> dataWindowContents) { if (_explicitIndexes.ContainsKey(indexName)) { throw new ExprValidationException("Index by name '" + indexName + "' already exists"); } var desc = EventTableIndexUtil.ValidateCompileExplicitIndex(unique, columns, eventType); var pair = AddExplicitIndexOrReuse(unique, desc.HashProps, desc.BtreeProps, dataWindowContents, eventType, indexName); _explicitIndexes.Put(indexName, pair.Second.EventTable); }
public void ValidateAddExplicitIndex(bool unique, string indexName, IList <CreateIndexItem> columns, EventType eventType, IEnumerable <EventBean> dataWindowContents, AgentInstanceContext agentInstanceContext, bool allowIndexExists, object optionalSerde) { if (_explicitIndexes.ContainsKey(indexName)) { if (allowIndexExists) { return; } throw new ExprValidationException("Index by name '" + indexName + "' already exists"); } var desc = EventTableIndexUtil.ValidateCompileExplicitIndex(unique, columns, eventType); AddExplicitIndex(indexName, desc, eventType, dataWindowContents, agentInstanceContext, optionalSerde); }