Github user myui commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/61#discussion_r105071319
  
    --- Diff: 
spark/spark-2.1/src/main/scala/org/apache/spark/sql/hive/HivemallOps.scala ---
    @@ -805,6 +805,47 @@ final class HivemallOps(df: DataFrame) extends Logging 
{
         JoinTopK(kInt, df.logicalPlan, right.logicalPlan, Inner, 
Option(joinExprs.expr))(score.named)
       }
     
    +  private def doFlatten(schema: StructType, prefix: Option[String] = None) 
: Seq[Column] = {
    +    schema.fields.flatMap { f =>
    +      val colName = prefix.map(p => s"$p.${f.name}").getOrElse(f.name)
    --- End diff --
    
    Dot `.` is a special symbol in SQL. So, better to change the default 
separator (e.g., `$` ) and have an option to choose the separator. 
`news20.train` means train table in news20 database.
    
    SQL identifiers are depending on RDBMSs but generally includes 
`[0-9,a-z,A-Z$_]`.
    https://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html
    https://msdn.microsoft.com/en-us/library/ms175874.aspx
    https://dev.mysql.com/doc/refman/5.7/en/identifiers.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to