-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event table @index operations are not uniform across stores #1228
Comments
In databases, if you want to create indexes for multiple columns then you have to create individual indexes multiple time. And if we want to add multiple columns for same index then it is considered as composite index. Then we can have below approach. If you wanted to create individual indexes for column a, b and c then If we wanted to create composite index key then we can go as @index(a, b, c). Then, RDBMS extension behavior is correct. We should correct the behavior of in-memory and mongodb. As the first step, we'll print an error log for in-memory if multiple columns are defined within @index annotation and ask the user to define it separately. And we could work on improving the composite index key support for in-memory and mongo db store in future. |
+1 for correcting it this way. However, for MongoDB, there is an issue as only getting the column name is not enough. since for index creation, we have to pass 3 params, column name, sorting order and options,
For mongo DB as of now, the index annotation will be as follows,
However, if we want to standardise this, we can go with
As it will be easy for composite keys as follws,
Any other suggestions for this? |
As long as MongoDB does not have a composite index this approach will be fine. |
The support is finished for InMemory, RDBMS and MongoDB. I have opened the issue for siddhi-store-redis in extension repo. siddhi-io/siddhi-store-redis#30 |
Description:
We have behaviours as below,
Example - @Index('a', 'b')
Moreover, @Index annotation functionality also differs from @PrimaryKey functionality as in @PrimaryKey we combine all elements to create one primary key however in @Index this is seperate
Affected Siddhi Version:
Siddhi 4.x and relevant extensions
The text was updated successfully, but these errors were encountered: