Skip to content

[CLIENT-4836] Add support for string operations and expressions#1072

Draft
juliannguyen4 wants to merge 203 commits into
devfrom
CLIENT-4836-add-string-ops-and-expressions
Draft

[CLIENT-4836] Add support for string operations and expressions#1072
juliannguyen4 wants to merge 203 commits into
devfrom
CLIENT-4836-add-string-ops-and-expressions

Conversation

@juliannguyen4

@juliannguyen4 juliannguyen4 commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Deprecate using aerospike_helpers.operations.operations.{append,prepend} with strings.

TODO

  • Python docstrings in VS code are not formatted. So the placeholders still show up in type hinting. This problem may also exist with extended metrics / NodeStats in aerospike_helpers. There's no well known solution for this.
  • Ops dictionaries now have extra variables we don't want (found via GDB). Need to omit those... only way is to filter out locals() using dictionary comprehension, but this is O(n) time.
  • Expressions need to state return value type since they are strongly typed Ignoring since it makes the return description too long IMO
  • Cross reference for expressions to corresponding operations doesn't show up in IDE type hints Cross reference generated at runtime
  • Align with other clients re: snip. Make end argument required
  • Add copyright notices to all new files
  • Find way to automate copyright notices
  • Regression if deprecating CmpRegex?

Docs

https://aerospike-python-client--1072.org.readthedocs.build/en/1072/aerospike_helpers.operations.html#module-aerospike_helpers.operations.string_operations
https://aerospike-python-client--1072.org.readthedocs.build/en/1072/aerospike_helpers.expressions.html#module-aerospike_helpers.expressions.string

@codecov-commenter

codecov-commenter commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 436 lines in your changes missing coverage. Please review.
✅ Project coverage is 2.59%. Comparing base (90a0873) to head (6a56e5a).

Files with missing lines Patch % Lines
src/main/client/list_and_string_operate.c 0.00% 193 Missing ⚠️
src/main/convert_expressions.c 0.00% 190 Missing ⚠️
src/main/client/cdt_operation_utils.c 0.00% 24 Missing ⚠️
src/main/conversions.c 0.00% 19 Missing ⚠️
src/main/client/operate.c 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #1072       +/-   ##
==========================================
- Coverage   84.46%   2.59%   -81.87%     
==========================================
  Files          99      80       -19     
  Lines       14090   12596     -1494     
==========================================
- Hits        11901     327    -11574     
- Misses       2189   12269    +10080     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…urs. Just copy type alias TypeCTX to string_operations.py so we don't need to have a import only for type hints
…reasing numeric order) instead of the default alphabetical order
…o define set of _AS_STRING_OP* codes separate from the C client's AS_STRING_OP* codes. The _AS_STRING* codes need to be unique from the other op codes exposed via aerospike_helpers. Then use X macro to expose string op codes from aerospike module
…e type stubs don't show any constants with value 127, so I believe _AS_EXP_CODE_CALL is safe to expose for aerospike_helpers.expressions to use
…ATOR_PREPEND with new string ops to resolve deprecation warnings
…he correct non-deprecated string op in a helper function when used throughout the tests.
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.

2 participants