From b4c37978b297966a33bb9cd6a2a6e86e68644e62 Mon Sep 17 00:00:00 2001 From: harshal359 Date: Thu, 7 Dec 2023 22:12:09 -0600 Subject: [PATCH] REST-97 - ran scalafmt --- .../DataFrameTransformerImplicits.scala | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/scala/com/clairvoyant/data/scalaxy/transformer/DataFrameTransformerImplicits.scala b/src/main/scala/com/clairvoyant/data/scalaxy/transformer/DataFrameTransformerImplicits.scala index f7b3c8f..984b9bc 100644 --- a/src/main/scala/com/clairvoyant/data/scalaxy/transformer/DataFrameTransformerImplicits.scala +++ b/src/main/scala/com/clairvoyant/data/scalaxy/transformer/DataFrameTransformerImplicits.scala @@ -474,6 +474,7 @@ object DataFrameTransformerImplicits { schema ) ) + /** * Converts the column with JSON string as value to struct type * @@ -482,16 +483,14 @@ object DataFrameTransformerImplicits { * @param regex * The Data Definition Language (DDL) for the column * @return - * DataFrame + * DataFrame */ - def filterByRegex(columnName: String, regex: String) - : DataFrame = - import df.sparkSession.implicits.* - val df1 = df.withColumn(columnName, regexp_extract(col(columnName), regex, 0)) - val df2 = df1.where(col(columnName) =!= "") - df2 - + def filterByRegex(columnName: String, regex: String): DataFrame = + import df.sparkSession.implicits.* + val df1 = df.withColumn(columnName, regexp_extract(col(columnName), regex, 0)) + val df2 = df1.where(col(columnName) =!= "") + df2 /** * Flattens the schema of the dataframe. If any of the column is of StructType or is nested, this transformation