ing-bank / scruid

Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes.
Apache License 2.0
115 stars 29 forks source link

Extraction dimension and functions #22

Closed vkorchik closed 6 years ago

vkorchik commented 6 years ago
  1. Added Extraction dimension. Previous Dimension class was renamed to DefaultDimension, but is still accessible via Dimension.apply, so code Dimension("dim") is valid.
  2. Added all extraction functions except "searchQuery", "lookup" and "registeredLookup": these are tightly coupled with respective query types, and I decided not to implement them in this PR.

Extraction fucntions are in its separate file for two reasons:

  1. It is a big piece of code to place it inside Dimension.scala.
  2. Some of the functions could be used in Filters, so these functions could be a common thing for different parts of the project. (Marker traits could be used for distinction, or smth like that)

logback-test.xml was added to get rid of huge amount of logs while tests are running.

vkorchik commented 6 years ago

@Fokko, Hi Can you look at circle failed build? Something is wrong with it rather than with code. I'll appreciate your help very much.

Fokko commented 6 years ago

Hi @vkorchik, thanks for reaching out. Appreciate the contributions you're doing to Scruid, together we'll make an awesome product! The problem is in the Codacy token. This one is not available for pull-requests since it would a security breach. Evil people could then extract the token and make mis-use of it. I've disabled codacy on PR's, which is fine I guess. If you rebase onto master, the tests should pass. Cheers!

vkorchik commented 6 years ago

hi @Fokko , thank you for quick response! What do you mean by "rebase on master"? You mean to create the same branch in the original repo (ing-bank/scruid), i.e. not in my fork, and create PR then?

Fokko commented 6 years ago

Rebasing on master means that you need to pull the current master in your own branch. You can do this from your fork, but you need to add the ing-bank repo as a separate remote.

vkorchik commented 6 years ago

Oh, I'm sorry, I've missed your commit today in the morning, and thought "but I am on master!". Ok, will be done in a minute :smile:

bjgbeelen commented 6 years ago

Thanks for the contribution, looking good. Would be nice to squash the commits though.

vkorchik commented 6 years ago

@bjgbeelen, done. Thank you for note.