Skip to content
Closed
Prev Previous commit
Next Next commit
SPARK-47217. fix style format issue
  • Loading branch information
ashahid committed Mar 1, 2024
commit 31d66c2540423aa852d444c14e88cbfcfaaedc8c
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,10 @@ public void testDedupBehaviourOnProjection_SPARK_47217() {

//Create table 3 DataFrame
List<Row> table3Data = Arrays.asList(RowFactory.create(1, 2, 3), RowFactory.create(1, 2, 3));
StructType table3Schema = new StructType().
add("col31", DataTypes.IntegerType).
add("col32", DataTypes.IntegerType).
add("col33", DataTypes.IntegerType);
StructType table3Schema = new StructType()
.add("col31", DataTypes.IntegerType)
.add("col32", DataTypes.IntegerType)
.add("col33", DataTypes.IntegerType);

Dataset<Row> table3 = spark.createDataFrame(table3Data, table3Schema);

Expand All @@ -591,16 +591,15 @@ public void testDedupBehaviourOnProjection_SPARK_47217() {
//Perform leftouter join for exchange table2(firstjoin)
srcDf = srcDf.join(
broadcast(table3),
srcDf.col("col12").equalTo(
table3.col("col32")), "left_outer").
select(srcDf.col("col11"), srcDf.col("col12"),
srcDf.col("col12").equalTo(table3.col("col32")),
"left_outer").select(srcDf.col("col11"),
srcDf.col("col12"),
srcDf.col("col13"),
table3.col("col33").as("col33_1"));

//Perform left outer joinfor exchangeRateTable1 again(secondjoin)
Dataset<Row> temp = srcDf.join(broadcast(table3),
srcDf.col("col11").equalTo(
table3.col("col31")), "left_outer");
srcDf.col("col11").equalTo(table3.col("col31")), "left_outer");

srcDf = temp.select(srcDf.col("col11"), srcDf.col("col12"),
srcDf.col("col13"), srcDf.col("col33_1"),
Expand Down