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

Handle human readable number casting in general #1309

Open
mathemancer opened this issue Apr 26, 2022 · 9 comments
Open

Handle human readable number casting in general #1309

mathemancer opened this issue Apr 26, 2022 · 9 comments
Labels
affects: architecture Improvements or additions to architecture needs: requirements The problem is clear and worth solving, but we're not yet sure of the best solution needs: unblocking Blocked by other work type: enhancement New feature or request work: db-layer Related to SQL or PL/pgSQL
Milestone

Comments

@mathemancer
Copy link
Contributor

Problem

Currently, casting from textual types (e.g., TEXT) to numbers relies on the default PostgreSQL number handling. This will be solved for the NUMERIC type once #1107 is solved, but we should also handle other number types.

Proposed solution

We should write custom logic to allow handling casting more strings to number types.

  • Casting to number types with decimals should use the same (or very similar) logic to casting to NUMERIC.
  • Casting to number types without decimals (e.g., INTEGER) should use a subset of that logic that handles only grouping separators.

Additional context

This was originally inspired by the custom casting work for money types. See #1137 . This issue should complete the work begun when solving #1107 .

@mathemancer mathemancer added type: enhancement New feature or request good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this affects: architecture Improvements or additions to architecture work: backend Related to Python, Django, and simple SQL work: database needs: unblocking Blocked by other work labels Apr 26, 2022
@mathemancer
Copy link
Contributor Author

Marking this as blocked until #1107 is solved.

@Cronus1007
Copy link
Contributor

@mathemancer I would like to work upon this issue once it gets unblocked.

@kgodey kgodey modified the milestones: [06.2] 2022-04 improvements, [08.1] 2022-05 improvements May 2, 2022
@kgodey kgodey modified the milestones: [08.1] 2022-05 improvements, High Priority Jun 1, 2022
@kgodey kgodey added ready Ready for implementation and removed needs: unblocking Blocked by other work labels Sep 1, 2022
@SatabrataPaul-GitAc
Copy link

HI @kgodey
Myself Satabrata Paul. a passionate backend and cloud developer from India
I would like to get started in contributing to this project , for Hacktoberfest this year . i.e. 2022
I have previously contributed to major open source projects (presently working with The Linux Foundation - LFX Mentorship)
Can we schedule a 1:1 call over gmeet ?
I just wanted to understand the code and the repository a bit better which would in turn help me pickup the issues

I am located in India (IST)
Here is my email id for reference : [email protected]

Hoping for a response soon !!!

@kgodey
Copy link
Contributor

kgodey commented Sep 27, 2022

@SatabrataPaul-GitAc I don't have much time available but if you're interested in frontend work, @rajatvijay is wiling to meet with you.

@Aditramesh
Copy link

@kgodey can i work on this issue?

@kgodey
Copy link
Contributor

kgodey commented Feb 6, 2023

Sure go ahead @Aditramesh

@7ashraf
Copy link

7ashraf commented Mar 27, 2023

Can I have assistance on this issue, I am trying to work on this issue, where exactly in the code files should the enhancement be done?

@rajatvijay
Copy link
Contributor

@7ashraf

where exactly in the code files should the enhancement be done?

This is something that you need to figure out on your own while working on the issue. Please ask more specific questions, this makes it easier and faster for us to provide help.

Also, you should look at the "Additional Context" section in the issue description. It links #1137 which should give you some headstart.

@mathemancer
Copy link
Contributor Author

This issue is still relevant, but needs to be improved and clarified.

  • The work will be blocked until casting is on the DB, since the implementation will be db-layer.
  • We should have a product-level discussion about how we want users to interact with various number types before speccing this issue out

I'm going to leave it open, but block it and add some labels.

@mathemancer mathemancer added work: db-layer Related to SQL or PL/pgSQL needs: requirements The problem is clear and worth solving, but we're not yet sure of the best solution needs: unblocking Blocked by other work and removed help wanted Community contributors can implement this work: backend Related to Python, Django, and simple SQL ready Ready for implementation good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: architecture Improvements or additions to architecture needs: requirements The problem is clear and worth solving, but we're not yet sure of the best solution needs: unblocking Blocked by other work type: enhancement New feature or request work: db-layer Related to SQL or PL/pgSQL
Projects
No open projects
8 participants