You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dengziming (via GitHub)" <gi...@apache.org> on 2023/10/31 07:09:36 UTC

[PR] [SPARK-45736][EXAMPLE] Use \s+ as separator when testing kafka source and network source [spark]

dengziming opened a new pull request, #43597:
URL: https://github.com/apache/spark/pull/43597

   ### What changes were proposed in this pull request?
   When testing data is from Kafka or network, it's possible that we generator redundant blanks, so use "\\s+" as separator.
   
   
   ### Why are the changes needed?
   More convenient for developer.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   Tested locally.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45736][EXAMPLE] Use \s+ as separator when testing kafka source and network source [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #43597:
URL: https://github.com/apache/spark/pull/43597#issuecomment-1935133044

   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45736][EXAMPLE] Use \s+ as separator when testing kafka source and network source [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #43597: [SPARK-45736][EXAMPLE] Use \s+ as separator when testing kafka source and network source
URL: https://github.com/apache/spark/pull/43597


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45736][EXAMPLE] Use \s+ as separator when testing kafka source and network source [spark]

Posted by "dengziming (via GitHub)" <gi...@apache.org>.
dengziming commented on code in PR #43597:
URL: https://github.com/apache/spark/pull/43597#discussion_r1377136420


##########
examples/src/main/r/streaming/structured_network_wordcount.R:
##########
@@ -44,7 +44,7 @@ port <- as.integer(args[[2]])
 lines <- read.stream("socket", host = hostname, port = port)
 
 # Split the lines into words
-words <- selectExpr(lines, "explode(split(value, ' ')) as word")
+words <- selectExpr(lines, "explode(strsplit(value, '\\s+')) as word")

Review Comment:
   Not sure is this the right semantics for R, can someone help to verify?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org