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

Implement replace on the Database Column #5160

Closed
wdanilo opened this issue Feb 5, 2023 · 14 comments · Fixed by #7275
Closed

Implement replace on the Database Column #5160

wdanilo opened this issue Feb 5, 2023 · 14 comments · Fixed by #7275
Assignees
Labels
-libs Libraries: New libraries to be implemented l-derived-columns p-low Low priority x-new-feature Type: new feature request
Milestone

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by James Dunkerley.
Original issue is here.


    replace : Text | Column -> Text | Column -> Case_Sensitivity -> Boolean -> Boolean -> Column
    replace self term="" new_text="" case_sensitivity=Case_Sensitivity.Sensitive only_first=False use_regex=False =
  • Surfaces the same options as Text.replace.
  • Should follow the same API as the in-memory version.
  • Case Insensitive in non-default locale should be an error.
  • What modes are available will depend on what is supported by the dialect.

This should be done by mapping the modes to specific dialect operators:

case_sensitive use_regex only_first operation
True False True Replace_First
True False All Replace_All
False False True IReplace_First
False False All IReplace_All

etc.

@jdunkerley jdunkerley added this to the Beta Release milestone Apr 20, 2023
@jdunkerley jdunkerley changed the title Add replace and replace_all to Database Column Implement replace on the Database Column Apr 20, 2023
@GregoryTravis
Copy link
Contributor

GregoryTravis commented Jul 7, 2023

Looking through the Postgres and SQLite docs, it looks like

case_sensitive use_regex only_first postgres sqlite
True False False supported supported
True False True via regex(2) via instr(3)
False False False via regex(1) unsupported
False False True via regex(1,2) via instr(3)

(1) Postgres regex supports case insensitivity; this would require escaping the search string so it would not act as a regex.
(2) Postgres regex supports only_first starting with version 13; this would require escaping the search string so it would not act as a regex.
(3) Use INSTR() to find the lowercased string, then replace it via concatenation

@enso-bot
Copy link

enso-bot bot commented Jul 7, 2023

Greg Travis reports a new STANDUP for today (2023-07-07):

Progress: Researched db implemenetations It should be finished by 2023-07-13.

Next Day: basic replace

@enso-bot
Copy link

enso-bot bot commented Jul 11, 2023

Greg Travis reports a new STANDUP for today (2023-07-11):

Progress: figuring out which flags are supported where; tests It should be finished by 2023-07-13.

Next Day: basic replace

@enso-bot
Copy link

enso-bot bot commented Jul 11, 2023

Greg Travis reports a new STANDUP for today (2023-07-11):

Progress: basic replace, and one other case It should be finished by 2023-07-13.

Next Day: more cases

@enso-bot
Copy link

enso-bot bot commented Jul 12, 2023

Greg Travis reports a new STANDUP for today (2023-07-12):

Progress: all cases and tests It should be finished by 2023-07-13.

Next Day: review

@enso-bot
Copy link

enso-bot bot commented Jul 13, 2023

Greg Travis reports a new 🔴 DELAY for today (2023-07-13):

Summary: There is 1 days delay in implementation of the Implement replace on the Database Column (#5160) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: use metadata

@enso-bot
Copy link

enso-bot bot commented Jul 13, 2023

Greg Travis reports a new STANDUP for today (2023-07-13):

Progress: using metadata to reduce cases It should be finished by 2023-07-14.

Next Day: try to use metadata

@enso-bot
Copy link

enso-bot bot commented Jul 14, 2023

Greg Travis reports a new 🔴 DELAY for today (2023-07-14):

Summary: There is 3 days delay in implementation of the Implement replace on the Database Column (#5160) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: postgres version in compatibility

@enso-bot
Copy link

enso-bot bot commented Jul 14, 2023

Greg Travis reports a new STANDUP for today (2023-07-14):

Progress: using metadata to reduce cases It should be finished by 2023-07-17.

Next Day: debug it

@enso-bot
Copy link

enso-bot bot commented Jul 17, 2023

Greg Travis reports a new 🔴 DELAY for today (2023-07-17):

Summary: There is 1 days delay in implementation of the Implement replace on the Database Column (#5160) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: review

@enso-bot
Copy link

enso-bot bot commented Jul 17, 2023

Greg Travis reports a new STANDUP for today (2023-07-17):

Progress: do supported check early It should be finished by 2023-07-18.

Next Day: debug it

@enso-bot
Copy link

enso-bot bot commented Jul 18, 2023

Greg Travis reports a new 🔴 DELAY for today (2023-07-18):

Summary: There is 1 days delay in implementation of the Implement replace on the Database Column (#5160) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: review

@enso-bot
Copy link

enso-bot bot commented Jul 18, 2023

Greg Travis reports a new STANDUP for today (2023-07-18):

Progress: reivew; working on java round; debugging time zone test failures It should be finished by 2023-07-19.

Next Day: java round

@enso-bot
Copy link

enso-bot bot commented Jul 19, 2023

Greg Travis reports a new 🔴 DELAY for today (2023-07-19):

Summary: There is 1 days delay in implementation of the Implement replace on the Database Column (#5160) task.
It will cause 0 days delay for the delivery of this weekly plan.

Delay Cause: review; CI failures

@jdunkerley jdunkerley linked a pull request Jul 25, 2023 that will close this issue
5 tasks
@mergify mergify bot closed this as completed in #7275 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented l-derived-columns p-low Low priority x-new-feature Type: new feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants