public void AddIndexReference(IndexMultiKey indexMultiKey, string statementName)
        {
            EventTableIndexMetadataEntry entry = _indexes.Get(indexMultiKey);

            if (entry == null)
            {
                return;
            }
            entry.AddReferringStatement(statementName);
        }
        public void AddIndexNonExplicit(IndexMultiKey indexMultiKey, string statementName, QueryPlanIndexItem queryPlanIndexItem)
        {
            if (_indexes.ContainsKey(indexMultiKey))
            {
                return;
            }
            var entry = new EventTableIndexMetadataEntry(null, false, queryPlanIndexItem, null);

            entry.AddReferringStatement(statementName);
            _indexes.Put(indexMultiKey, entry);
        }
        public void AddIndexExplicit(bool isPrimary, IndexMultiKey indexMultiKey, string explicitIndexName, QueryPlanIndexItem explicitIndexDesc, string statementName)
        {
            if (GetIndexByName(explicitIndexName) != null)
            {
                throw new ExprValidationException("An index by name '" + explicitIndexName + "' already exists");
            }
            if (_indexes.ContainsKey(indexMultiKey))
            {
                throw new ExprValidationException("An index for the same columns already exists");
            }
            EventTableIndexMetadataEntry entry = new EventTableIndexMetadataEntry(explicitIndexName, isPrimary, explicitIndexDesc, explicitIndexName);

            entry.AddReferringStatement(statementName);
            _indexes.Put(indexMultiKey, entry);
        }