Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bli committed Nov 20, 2023
1 parent 09d50b5 commit f428a7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/com/snowflake/snowpark/DataFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,9 @@ class DataFrame private[snowpark] (
val dfPrefix = DataFrame.generatePrefix('o')
val renamedDf =
this.select(this.output.map(_.name).map(aliasIfNeeded(this, _, dfPrefix, dup.toSet)))
renamedDf.joinTableFunction(func, partitionByOrderBy)
withPlan {
TableFunctionJoin(renamedDf.plan, func, partitionByOrderBy)
}
} else {
originalResult
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,9 @@ class TableFunctionSuite extends TestData {
result4,
Seq(Row(1, 1, "1", 101), Row(1, 2, "2", 101), Row(2, 1, "3", 102), Row(2, 2, "4", 102)))
}

test("table function join with duplicated column name") {
val df = Seq((1, "1,2"), (2, "3,4")).toDF("idx", "value")
df.show()
}
}

0 comments on commit f428a7c

Please sign in to comment.