Skip to content
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

feat: priority recompute restructure #279

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pratikmishra356
Copy link
Collaborator

Problem

User has to declare this exponential value, as value is exponential it has limitation on the total number of dimensions that can be defined

Solution

Postgresql's Numeric Type Approach

For dimension we can have another column named order which will store order of dimension's specificity ,
the higher order is means more specific
For context , we will have another column named weightage , where we will calculate the value just like we do now
it will summation of (2^ dimension's order value)

since context's weightage value can be too large , so we will use postgresql Numeric type

CREATE TABLE large_numbers (
id SERIAL PRIMARY KEY,
big_value NUMERIC
);
Rust/ Diesel supports BigDecimal type which is compatible with Numeric type

Environment variable changes

What ENVs need to be added or changed

Pre-deployment activity

Things needed to be done before deploying this change (if any)

Post-deployment activity

Things needed to be done after deploying this change (if any)

API changes

Endpoint Method Request body Response Body
API GET/POST, etc request response

Possible Issues in the future

Describe any possible issues that could occur because of this change

@pratikmishra356 pratikmishra356 requested a review from a team as a code owner November 7, 2024 10:15
@pratikmishra356 pratikmishra356 force-pushed the priority-value-restructure branch 4 times, most recently from 99e5438 to 84f87ab Compare November 13, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant