Skip to content

[MINOR] Rebased MOR iterators onto a CachingIterator (to be idempotent)#7334

Merged
alexeykudinkin merged 1 commit intoapache:masterfrom
onehouseinc:ak/spk-mor-itr-fix
Nov 30, 2022
Merged

[MINOR] Rebased MOR iterators onto a CachingIterator (to be idempotent)#7334
alexeykudinkin merged 1 commit intoapache:masterfrom
onehouseinc:ak/spk-mor-itr-fix

Conversation

@alexeykudinkin
Copy link
Copy Markdown
Contributor

@alexeykudinkin alexeykudinkin commented Nov 30, 2022

Change Logs

Addressing an invalid semantic of MOR iterators not being actually idempotent: ie, calling hasNext multiple times was actually leading to iterator advancing, therefore potentially skipping the elements for ex in cases like:

// [[isEmpty]] will invoke [[hasNext]] to check whether Iterator has any elements
if (iter.isEmpty) {
  // ...
} else {
  // Here [[map]] will invoke [[hasNext]] again, therefore skipping the elements
  iter.map { /* ... */ }
}

Impact

Low

Risk level (write none, low medium or high below)

Low

Documentation Update

N/A

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@hudi-bot
Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@alexeykudinkin alexeykudinkin merged commit d7a7285 into apache:master Nov 30, 2022
vamshigv pushed a commit to vamshigv/hudi that referenced this pull request Dec 1, 2022
…ache#7334)

Addressing an invalid semantic of MOR iterators not being actually idempotent: ie, calling `hasNext` multiple times was actually leading to iterator advancing, therefore potentially skipping the elements for ex in cases like:

```
// [[isEmpty]] will invoke [[hasNext]] to check whether Iterator has any elements
if (iter.isEmpty) {
  // ...
} else {
  // Here [[map]] will invoke [[hasNext]] again, therefore skipping the elements
  iter.map { /* ... */ }
}
```
satishkotha pushed a commit that referenced this pull request Dec 13, 2022
)

Addressing an invalid semantic of MOR iterators not being actually idempotent: ie, calling `hasNext` multiple times was actually leading to iterator advancing, therefore potentially skipping the elements for ex in cases like:

```
// [[isEmpty]] will invoke [[hasNext]] to check whether Iterator has any elements
if (iter.isEmpty) {
  // ...
} else {
  // Here [[map]] will invoke [[hasNext]] again, therefore skipping the elements
  iter.map { /* ... */ }
}
```
nsivabalan pushed a commit that referenced this pull request Dec 13, 2022
)

Addressing an invalid semantic of MOR iterators not being actually idempotent: ie, calling `hasNext` multiple times was actually leading to iterator advancing, therefore potentially skipping the elements for ex in cases like:

```
// [[isEmpty]] will invoke [[hasNext]] to check whether Iterator has any elements
if (iter.isEmpty) {
  // ...
} else {
  // Here [[map]] will invoke [[hasNext]] again, therefore skipping the elements
  iter.map { /* ... */ }
}
```
nsivabalan added a commit that referenced this pull request Dec 13, 2022
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Apr 5, 2023
…ache#7334)

Addressing an invalid semantic of MOR iterators not being actually idempotent: ie, calling `hasNext` multiple times was actually leading to iterator advancing, therefore potentially skipping the elements for ex in cases like:

```
// [[isEmpty]] will invoke [[hasNext]] to check whether Iterator has any elements
if (iter.isEmpty) {
  // ...
} else {
  // Here [[map]] will invoke [[hasNext]] again, therefore skipping the elements
  iter.map { /* ... */ }
}
```
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.

3 participants