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

Extend nextDoc to delegate to the wrapped doc-value iterator for date_nanos #39176

Merged
merged 5 commits into from
Feb 21, 2019

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Feb 20, 2019

The type date_nanos does not direct doc-value iterators and it needs to extend next_doc in order to delegate the call to the wrapped iterator.

closes #39107

@iverase iverase requested a review from jpountz February 20, 2019 10:42
@iverase iverase added the :Analytics/Aggregations Aggregations label Feb 20, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

Thanks Ignacio. In addition to the integration test, can you add a unit test that the iterator supports nextDoc() in DateFieldTypeTests?

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

Some minor comments, LGTM. Thanks @iverase !

w.addDocument(doc);
docValuesField.setLongValue(1459641600000L);
w.addDocument(doc);
w.flush();
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to flush, DirectoryReader.open takes care of writing NRT segments for data that only lives in the IW buffers

.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 1).build();
QueryShardContext context = new QueryShardContext(0,
new IndexSettings(IndexMetaData.builder("foo").settings(indexSettings).build(), indexSettings),
null, null, null, null, null, xContentRegistry(), writableRegistry(), null, null, () -> nowInMillis, null);
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need this object, do we?

@iverase iverase merged commit f49d689 into elastic:master Feb 21, 2019
iverase added a commit that referenced this pull request Feb 21, 2019
…_nanos (#39176)

The type date_nanos does not direct doc-value iterators and it needs to extend `next_doc` in order to delegate the call to the wrapped iterator.
iverase added a commit that referenced this pull request Feb 21, 2019
…_nanos (#39176)

The type date_nanos does not direct doc-value iterators and it needs to extend `next_doc` in order to delegate the call to the wrapped iterator.
@iverase iverase deleted the dateNanos branch February 21, 2019 10:17
jasontedor added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 22, 2019
* elastic/master:
  Ensure index commit released when testing timeouts (elastic#39273)
  Avoid using TimeWarp in TransformIntegrationTests. (elastic#39277)
  Fixed missed stopping of SchedulerEngine (elastic#39193)
  [CI] Mute CcrRetentionLeaseIT.testRetentionLeaseIsRenewedDuringRecovery (elastic#39269)
  Muting AutoFollowIT.testAutoFollowManyIndices (elastic#39264)
  Clarify the use of sleep in CCR test
  Fix testCannotShrinkLeaderIndex (elastic#38529)
  Fix CCR tests that manipulate transport requests
  Align generated release notes with doc standards (elastic#39234)
  Mute test (elastic#39248)
  ReadOnlyEngine should update translog recovery state information (elastic#39238)
  Wrap accounting breaker check in assertBusy (elastic#39211)
  Simplify and Fix Synchronization in InternalTestCluster (elastic#39168)
  [Tests] Make testEngineGCDeletesSetting deterministic (elastic#38942)
  Extend nextDoc to delegate to the wrapped doc-value iterator for date_nanos (elastic#39176)
  Change ShardFollowTask to reuse common serialization logic (elastic#39094)
  Replace superfluous usage of Counter with Supplier (elastic#39048)
  Disable bwc tests for elastic#39094
weizijun pushed a commit to weizijun/elasticsearch that referenced this pull request Feb 22, 2019
…_nanos (elastic#39176)

The type date_nanos does not direct doc-value iterators and it needs to extend `next_doc` in order to delegate the call to the wrapped iterator.
weizijun pushed a commit to weizijun/elasticsearch that referenced this pull request Feb 22, 2019
…_nanos (elastic#39176)

The type date_nanos does not direct doc-value iterators and it needs to extend `next_doc` in order to delegate the call to the wrapped iterator.
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.

date_histogram aggregation fails for date_nanos and noon utc timezone
5 participants