Skip to content

Support multi-dimensional filters#2217

Closed
navis wants to merge 2 commits intoapache:masterfrom
navis:multi-dimensional-filter
Closed

Support multi-dimensional filters#2217
navis wants to merge 2 commits intoapache:masterfrom
navis:multi-dimensional-filter

Conversation

@navis
Copy link
Copy Markdown
Contributor

@navis navis commented Jan 6, 2016

Work for #2187

I didn't know that there is already a PR(#2210) on that till this tomorrow. But things done and I'm making PR to be used as reference purpose.

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 6, 2016

Hi @navis, can you and @sirpkt consolidate #2210 and #2217 into a single PR?

@navis
Copy link
Copy Markdown
Contributor Author

navis commented Jan 7, 2016

@fjy Each are implemented in (much) different manner. Might be hard to consolidate.

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 7, 2016

@navis it'll be challenging to review both if they overlap in functionality :), do you guys want to have an internal discussion about which one people should review?

@navis
Copy link
Copy Markdown
Contributor Author

navis commented Jan 7, 2016

@fjy We should do ;). Could you wait for sometime before starting the reviewing?

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 9, 2016

@navis I'm guessing this is the PR to review right?

@navis
Copy link
Copy Markdown
Contributor Author

navis commented Jan 11, 2016

@fjy I've talked with @sirpkt and concluded we need both of implementation in druid because this(#2217) has different semantic with current implementation on multi-valued dimensions, but which might be useful in some cases.

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 11, 2016

@navis okay. Will @sirpkt reopen his PR? Just as an FYI, the JS implementations of features will be much slower than native Java implementations.

@navis navis force-pushed the multi-dimensional-filter branch 4 times, most recently from 1632532 to 0857c80 Compare January 13, 2016 23:33
@navis
Copy link
Copy Markdown
Contributor Author

navis commented Jan 14, 2016

merged #2210

Comment thread docs/content/querying/filters.md Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer if we did not introduce a second javascript filter and instead merge this into the existing one.
We should maintain backwards compatibility for the old syntax, but use the new one by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but each filter has different semantic and hard to merge into single one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is better to have a flag on javascript filter that utimately leads to two code paths, one that uses indexes, and one that doesnt rather htan having two separate implementations. Two impls will confuse users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@fjy You are right. How couldn't I thought of that?

@navis navis force-pushed the multi-dimensional-filter branch from a576780 to 04b55e7 Compare January 19, 2016 05:47
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if this goes into 0.9.0 (which I think it should), we can make the backwards incompatible API change

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we need to maintain backwards compatibility to allow for rolling upgrades.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@xvrl is correct. I didn't think about rolling upgrades. But we can remove "dimension" from the docs and let new people use "dimensions" everywhere

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@navis let's remove "dimension" from the docs but keep it in the code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 for removing dimension from docs. also, let us explicitly call it deprecated in 0.9.0 release notes so that we can remove it in later release from the code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will be removed.

@navis navis force-pushed the multi-dimensional-filter branch from 04b55e7 to 806e4c0 Compare January 20, 2016 01:58
@navis
Copy link
Copy Markdown
Contributor Author

navis commented Jan 20, 2016

Test failed by regression of #2006

@fjy fjy added this to the 0.9.0 milestone Jan 21, 2016
@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 21, 2016

@navis I think the issues you brought up in #2006 should now be addressed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor nit, but can we move static functions to the top of the class? similar to other druid files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I remember someone has told me static class should be at the bottom of the class in other PR. Then methods to top and classes to bottom. Right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

moved up

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Feb 3, 2016

@navis we can move this to 0.9.1 as I think it might take a little bit more work to finish this one up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the difference between this method and makeValueMatcher?

@cheddar
Copy link
Copy Markdown
Contributor

cheddar commented Feb 3, 2016

A part of me wonders if this wouldn't be simpler if we were to add the method

public ValueMatcher makeValueMatcher(ColumnSelectorFactory metricFactory);

to the ValueMatcherFactory interface?

@fjy fjy modified the milestones: 0.9.1, 0.9.0 Feb 3, 2016
@navis navis force-pushed the multi-dimensional-filter branch 2 times, most recently from 743a015 to cd237a8 Compare February 5, 2016 04:42
@navis navis force-pushed the multi-dimensional-filter branch from cd237a8 to 336fc39 Compare February 15, 2016 02:02
@navis
Copy link
Copy Markdown
Contributor Author

navis commented Feb 15, 2016

@fjy We have a plan to use this but currently it's not yet applied. So no need to rush to include this in near release versions.
@cheddar It's an internal interface only used internally. We can do anything with that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is assuming that user has to call hasNext() before calling next() which i think is not part of the Iterator API, or i am missing something ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Feb 23, 2016

@navis any chance we can finish this one up? I think @cheddar's comment is reasonable

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Mar 14, 2016

@navis ?

@navis navis force-pushed the multi-dimensional-filter branch from 63e5273 to fbb8337 Compare March 15, 2016 02:57
@navis
Copy link
Copy Markdown
Contributor Author

navis commented Mar 15, 2016

@fjy Forgot for a long time. I'm on it.

@navis
Copy link
Copy Markdown
Contributor Author

navis commented Apr 18, 2016

Rebased on master. Because there has been so many changes in here about, I've make code barely compile. let's see the test results.

@navis navis force-pushed the multi-dimensional-filter branch from c8fc4b1 to 452b07e Compare April 18, 2016 07:40
@navis navis force-pushed the multi-dimensional-filter branch from 452b07e to 4d40232 Compare April 18, 2016 23:43
@navis
Copy link
Copy Markdown
Contributor Author

navis commented Apr 19, 2016

cannot sustain this, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants