[jira] [Commented] (SPARK-42564) Implement Dataset.version and Dataset.time
[ https://issues.apache.org/jira/browse/SPARK-42564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693643#comment-17693643 ] Apache Spark commented on SPARK-42564: -- User 'panbingkun' has created a pull request for this issue: https://github.com/apache/spark/pull/40176 > Implement Dataset.version and Dataset.time > -- > > Key: SPARK-42564 > URL: https://issues.apache.org/jira/browse/SPARK-42564 > Project: Spark > Issue Type: New Feature > Components: Connect >Affects Versions: 3.4.0 >Reporter: Herman van Hövell >Assignee: BingKun Pan >Priority: Major > > Implement Dataset.version and Dataset.time > {code:java} > /** > * The version of Spark on which this application is running. > * > * @since 2.0.0 > */ > def version: String = SPARK_VERSION > /** > * Executes some code block and prints to stdout the time taken to execute > the block. This is > * available in Scala only and is used primarily for interactive testing and > debugging. > * > * @since 2.1.0 > */ > def time[T](f: => T): T = { > val start = System.nanoTime() > val ret = f > val end = System.nanoTime() > // scalastyle:off println > println(s"Time taken: ${NANOSECONDS.toMillis(end - start)} ms") > // scalastyle:on println > ret > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-42564) Implement Dataset.version and Dataset.time
[ https://issues.apache.org/jira/browse/SPARK-42564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693642#comment-17693642 ] Apache Spark commented on SPARK-42564: -- User 'panbingkun' has created a pull request for this issue: https://github.com/apache/spark/pull/40176 > Implement Dataset.version and Dataset.time > -- > > Key: SPARK-42564 > URL: https://issues.apache.org/jira/browse/SPARK-42564 > Project: Spark > Issue Type: New Feature > Components: Connect >Affects Versions: 3.4.0 >Reporter: Herman van Hövell >Assignee: BingKun Pan >Priority: Major > > Implement Dataset.version and Dataset.time > {code:java} > /** > * The version of Spark on which this application is running. > * > * @since 2.0.0 > */ > def version: String = SPARK_VERSION > /** > * Executes some code block and prints to stdout the time taken to execute > the block. This is > * available in Scala only and is used primarily for interactive testing and > debugging. > * > * @since 2.1.0 > */ > def time[T](f: => T): T = { > val start = System.nanoTime() > val ret = f > val end = System.nanoTime() > // scalastyle:off println > println(s"Time taken: ${NANOSECONDS.toMillis(end - start)} ms") > // scalastyle:on println > ret > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-42564) Implement Dataset.version and Dataset.time
[ https://issues.apache.org/jira/browse/SPARK-42564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693401#comment-17693401 ] BingKun Pan commented on SPARK-42564: - I work on it. > Implement Dataset.version and Dataset.time > -- > > Key: SPARK-42564 > URL: https://issues.apache.org/jira/browse/SPARK-42564 > Project: Spark > Issue Type: New Feature > Components: Connect >Affects Versions: 3.4.0 >Reporter: Herman van Hövell >Priority: Major > > Implement Dataset.version and Dataset.time > {code:java} > /** > * The version of Spark on which this application is running. > * > * @since 2.0.0 > */ > def version: String = SPARK_VERSION > /** > * Executes some code block and prints to stdout the time taken to execute > the block. This is > * available in Scala only and is used primarily for interactive testing and > debugging. > * > * @since 2.1.0 > */ > def time[T](f: => T): T = { > val start = System.nanoTime() > val ret = f > val end = System.nanoTime() > // scalastyle:off println > println(s"Time taken: ${NANOSECONDS.toMillis(end - start)} ms") > // scalastyle:on println > ret > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org