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

[SQLite3] Add length function #740

Closed

Conversation

avishmehta68710
Copy link

@avishmehta68710 avishmehta68710 commented Mar 2, 2023

Add support for length built in aggregate function in sqlite3

@SuriZhang
Copy link
Collaborator

Please update the PR with a bit more details in your description to let reviewers know what are the changes in this PR also follow the contributing doc on requirements of commit history https://github.com/sqlancer/sqlancer/blob/master/CONTRIBUTING.md#commit-history

@avishmehta68710 avishmehta68710 changed the title Added Length function for MySQL [SQLite3] Add length function Mar 3, 2023
@@ -44,6 +44,18 @@ public SQLite3Constant apply(SQLite3Constant... args) {
}
},

LENGTH(1, "LENGTH") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The apply implementation is used only in PQS. I'm not sure if the Java string length maps directly to the SQLite one (also considering the different character encodings). Perhaps you could just return null (see

), so that a LENGTH function is used by NoREC and TLP, but not by PQS?

@mrigger
Copy link
Contributor

mrigger commented Mar 13, 2023

I just noticed that we actually have a separate enum with functions for non-PQS implementations, which already includes LENGTH (see

). Thus, I'm closing this PR. Thanks for spending time on this, and perhaps you can still identify some other functions not yet generated functions in that enum.

@mrigger mrigger closed this Mar 13, 2023
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.

None yet

3 participants