This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 026b88e87 [KYUUBI #5090] Fix AllKyuubiConfiguration to generate
redundant blank lines in Windows
026b88e87 is described below
commit 026b88e87b38dde87bf1c1a4bc053815528acbd2
Author: wforget <[email protected]>
AuthorDate: Mon Jul 24 22:40:40 2023 +0800
[KYUUBI #5090] Fix AllKyuubiConfiguration to generate redundant blank lines
in Windows
### _Why are the changes needed?_
close #5090
### _How was this patch tested?_
After this PR it generates normal settings file in windows.
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
locally before make a pull request
Closes #5091 from wForget/KYUUBI-5090.
Closes #5090
9e974c7f8 [wforget] fix
dc1ebfc08 [wforget] fix
2cbec60f9 [wforget] [KYUUBI-5090] Fix AllKyuubiConfiguration to generate
redundant blank lines in Windows
ecc3b4af6 [mans2singh] [KYUUBI #5086] [KYUUBI # 5085] Update config section
of deploy on kubernetes
Lead-authored-by: wforget <[email protected]>
Co-authored-by: mans2singh <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala | 1 -
.../src/test/scala/org/apache/kyuubi/MarkdownUtils.scala | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
index f355e1e6b..566126bb4 100644
---
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
+++
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/udf/KyuubiDefinedFunctionSuite.scala
@@ -56,7 +56,6 @@ class KyuubiDefinedFunctionSuite extends KyuubiFunSuite {
.lines("""
| Name | Description | Return Type | Since
| --- | --- | --- | ---
- |
|""")
KDFRegistry.registeredFunctions.foreach { func =>
builder.line(s"${func.name} | ${func.description} | ${func.returnType} |
${func.since}")
diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/MarkdownUtils.scala
b/kyuubi-common/src/test/scala/org/apache/kyuubi/MarkdownUtils.scala
index 25a768b75..805913343 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/MarkdownUtils.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/MarkdownUtils.scala
@@ -22,12 +22,12 @@ import java.nio.file.{Files, Path, StandardOpenOption}
import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer
-import scala.compat.Platform.EOL
import com.vladsch.flexmark.formatter.Formatter
import com.vladsch.flexmark.parser.{Parser, ParserEmulationProfile,
PegdownExtensions}
import com.vladsch.flexmark.profile.pegdown.PegdownOptionsAdapter
import com.vladsch.flexmark.util.data.{MutableDataHolder, MutableDataSet}
+import com.vladsch.flexmark.util.sequence.SequenceUtils.EOL
import org.scalatest.Assertions.{assertResult, withClue}
object MarkdownUtils {
@@ -58,7 +58,7 @@ object MarkdownUtils {
}
def line(str: String): String = {
- str.stripMargin.replaceAll(EOL, "")
+ str.stripMargin.linesIterator.mkString
}
def appendBlankLine(buffer: ArrayBuffer[String]): Unit = buffer += ""
@@ -80,7 +80,7 @@ class MarkdownBuilder {
* @return
*/
def line(str: String = ""): MarkdownBuilder = {
- buffer += str.stripMargin.replaceAll(EOL, "")
+ buffer += str.stripMargin.linesIterator.mkString
this
}
@@ -91,7 +91,7 @@ class MarkdownBuilder {
* @return
*/
def lines(multiline: String): MarkdownBuilder = {
- buffer ++= multiline.stripMargin.split(EOL)
+ buffer ++= multiline.stripMargin.linesIterator
this
}