Skip to content

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

Draft
juliannguyen4 wants to merge 163 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 163 commits into
devfrom
CLIENT-4836-add-string-ops-and-expressions

Conversation

@juliannguyen4

@juliannguyen4 juliannguyen4 commented May 20, 2026

Copy link
Copy Markdown
Collaborator

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

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 90.01248% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.53%. Comparing base (90a0873) to head (3e05565).

Files with missing lines Patch % Lines
src/main/convert_expressions.c 83.42% 31 Missing ⚠️
src/main/client/list_and_string_operate.c 88.88% 22 Missing ⚠️
aerospike_helpers/expressions/string.py 95.71% 9 Missing ⚠️
aerospike_helpers/operations/string_operations.py 94.87% 6 Missing ⚠️
src/main/client/cdt_operation_utils.c 76.92% 6 Missing ⚠️
src/main/conversions.c 78.94% 4 Missing ⚠️
aerospike_helpers/operations/operations.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1072      +/-   ##
==========================================
+ Coverage   84.46%   84.53%   +0.07%     
==========================================
  Files          99      102       +3     
  Lines       14090    14875     +785     
==========================================
+ Hits        11901    12575     +674     
- Misses       2189     2300     +111     

☔ 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
… the server now has the correct 8.1.3 version.
…) and append() only when strings are passed as arguments in favor of the string ops version.
…arguments. There are test cases for passing bytes to these functions, but it's not documented in the API docs. Replace all uses of the original prepend and append operations with the string ops versions to stop deprecation warnings from failing the tests.
…precated ; currently only a deprecation warning is printed at runtime.
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