Skip to content

Commit

Permalink
Merge pull request #44 from tobegit3hub/fix/fix_register_table
Browse files Browse the repository at this point in the history
  • Loading branch information
dl239 authored May 12, 2023
2 parents 677302e + 2d77827 commit 5b2331a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<sbt.project.name>core</sbt.project.name>

<!-- 4paradigm -->
<openmldb.batch.version>0.7.3</openmldb.batch.version>
<openmldb.native.version>0.7.3-allinone</openmldb.native.version>
<openmldb.batch.version>0.8.0</openmldb.batch.version>
<openmldb.native.version>0.8.0-allinone</openmldb.native.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3273,9 +3273,6 @@ class Dataset[T] private[sql](
@deprecated("Use createOrReplaceTempView(viewName) instead.", "2.0.0")
def registerTempTable(tableName: String): Unit = {
createOrReplaceTempView(tableName)

// Add by 4paradigm
sparkSession.openmldbSession.registerTable(tableName, this.asInstanceOf[DataFrame])
}

/**
Expand Down Expand Up @@ -3306,6 +3303,9 @@ class Dataset[T] private[sql](
* @since 2.0.0
*/
def createOrReplaceTempView(viewName: String): Unit = withPlan {
// Add by 4paradigm
sparkSession.openmldbSession.registerTableInOpenmldbSession("default_db", viewName, this.asInstanceOf[DataFrame])

createTempViewCommand(viewName, replace = true, global = false)
}

Expand Down

0 comments on commit 5b2331a

Please sign in to comment.