Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Dec 13, 2016

What changes were proposed in this pull request?

Right now StreamingQuery.lastProgress throws NoSuchElementException and it's hard to be used in Python since Python user will just see Py4jError.

This PR just makes it return null instead.

How was this patch tested?

test("lastProgress should be null when recentProgress is empty")

}

test("lastProgress should be null when recentProgress is empty") {
BlockingSource.latch = new CountDownLatch(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Glad that you got to re-use BlockingSource!

)
}

test("lastProgress should be null when recentProgress is empty") {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add a similar test to python just to make sure it returns None? Do we need to update any docs?

progressBuffer.toArray
}

/** Returns the most recent query progress update. */
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add returns null if there were no progress updates

@brkyvz
Copy link
Contributor

brkyvz commented Dec 13, 2016

Left one comment on updating docs, otherwise LGTM

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70106 has finished for PR 16273 at commit f6312d2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class EventTimeStats(var max: Long, var min: Long, var sum: Long, var count: Long)
  • class EventTimeStatsAccum(protected var currentStats: EventTimeStats = EventTimeStats.zero)

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70105 has finished for PR 16273 at commit 326d16f.

  • This patch passes all tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70112 has finished for PR 16273 at commit 005204e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 14, 2016

retest this please

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70124 has started for PR 16273 at commit 005204e.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 14, 2016

retest this please

@brkyvz
Copy link
Contributor

brkyvz commented Dec 14, 2016

LGTM!

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70138 has finished for PR 16273 at commit 005204e.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 14, 2016

Test build #70144 has finished for PR 16273 at commit 72e6329.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Dec 14, 2016
…entProgress is empty

## What changes were proposed in this pull request?

Right now `StreamingQuery.lastProgress` throws NoSuchElementException and it's hard to be used in Python since Python user will just see Py4jError.

This PR just makes it return null instead.

## How was this patch tested?

`test("lastProgress should be null when recentProgress is empty")`

Author: Shixiong Zhu <[email protected]>

Closes #16273 from zsxwing/SPARK-18852.

(cherry picked from commit 1ac6567)
Signed-off-by: Shixiong Zhu <[email protected]>
@asfgit asfgit closed this in 1ac6567 Dec 14, 2016
@zsxwing zsxwing deleted the SPARK-18852 branch December 14, 2016 22:35
robert3005 pushed a commit to palantir/spark that referenced this pull request Dec 15, 2016
…entProgress is empty

## What changes were proposed in this pull request?

Right now `StreamingQuery.lastProgress` throws NoSuchElementException and it's hard to be used in Python since Python user will just see Py4jError.

This PR just makes it return null instead.

## How was this patch tested?

`test("lastProgress should be null when recentProgress is empty")`

Author: Shixiong Zhu <[email protected]>

Closes apache#16273 from zsxwing/SPARK-18852.
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…entProgress is empty

## What changes were proposed in this pull request?

Right now `StreamingQuery.lastProgress` throws NoSuchElementException and it's hard to be used in Python since Python user will just see Py4jError.

This PR just makes it return null instead.

## How was this patch tested?

`test("lastProgress should be null when recentProgress is empty")`

Author: Shixiong Zhu <[email protected]>

Closes apache#16273 from zsxwing/SPARK-18852.
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