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

add strlen function #2217

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

Conversation

zjbpaul1317
Copy link
Contributor

@zjbpaul1317 zjbpaul1317 commented Nov 11, 2024

What problem does this PR solve?

Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR.

Type of change

  • New Feature (non-breaking change which adds functionality)

@JinHai-CN
Copy link
Contributor

Since the result is filtered by strlen(c1) = 3, the output of strlen(c1) should be 3. Am I right?

SELECT *, strlen(c1) FROM test_varchar_filter WHERE strlen(c1) = 3;
----
abc abcd 5

@JinHai-CN
Copy link
Contributor

Data type of varchar have two representation in Infinity. When check file src/parser/type/complex/varchar.h, you can find varchar data with length <= 13 and > 13 will have different memory layout. So the two cases should be tested in all function related with data type of varchar.

@zjbpaul1317
Copy link
Contributor Author

Data type of varchar have two representation in Infinity. When check file src/parser/type/complex/varchar.h, you can find varchar data with length <= 13 and > 13 will have different memory layout. So the two cases should be tested in all function related with data type of varchar.

Copy that

@JinHai-CN JinHai-CN added ci PR can be test and removed ci PR can be test labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci PR can be test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants