Skip to content

Commit

Permalink
Merge pull request byzer-org#507 from allwefantasy/mlsql
Browse files Browse the repository at this point in the history
修正as 表名bug
  • Loading branch information
allwefantasy authored Sep 6, 2018
2 parents 40c2610 + d23e7b0 commit 6a54ff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SelectAdaptor(scriptSQLExecListener: ScriptSQLExecListener) extends DslAda

val chunks = wowText.split("\\s+")
val tableName = chunks.last.replace(";", "")
val sql = originalText.replaceAll(s"as[\\s|\\n]+${tableName}", "")
val sql = wowText.replaceAll(s"as[\\s|\\n]+${tableName}", "")
scriptSQLExecListener.sparkSession.sql(sql).createOrReplaceTempView(tableName)
scriptSQLExecListener.setLastSelectTable(tableName)
}
Expand Down

0 comments on commit 6a54ff3

Please sign in to comment.