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

Allow attribute transformations in SELECT clause #23

Closed
wants to merge 2 commits into from

Conversation

khageshpatel
Copy link
Contributor

Implements transformation on attributes. Currently only implements format(size,'kb'/'mb'/'gb'), upper, fullpath but other functions can easily be added. Example query:

fsql "select format(size,'kb'), upper(fullpath(name)) from ."

@khageshpatel khageshpatel mentioned this pull request May 24, 2017
@kashav
Copy link
Owner

kashav commented May 24, 2017

For #17.

@kashav kashav changed the title Transformations on attribute Allow attribute transformations in SELECT clause May 24, 2017
@kashav
Copy link
Owner

kashav commented May 24, 2017

I've tested this and it works pretty well; some minor problems (like mode being empty), but no worries, will add a full review in the next day or so.

I'm going to play around with the code and see if I can add support for WHERE attributes as well as clean-up the logic a little bit.

@kashav
Copy link
Owner

kashav commented May 24, 2017

An update on this:

I thought it'd be a better idea to build this against the new parser structure (introduced in feature/subquery), so I've made some changes and pushed those to feature/attribute-modifiers.

I plan to work on this feature in that branch. Feel free to submit more work to that branch, should you have anything to add!

@khageshpatel
Copy link
Contributor Author

@kshvmdn Thanks

@kashav
Copy link
Owner

kashav commented Jun 4, 2017

Merged in 09ea293, thanks @khageshpatel!

@kashav kashav closed this Jun 4, 2017
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