Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21106#discussion_r186629667
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Projection.scala
 ---
    @@ -108,7 +108,31 @@ abstract class UnsafeProjection extends Projection {
       override def apply(row: InternalRow): UnsafeRow
     }
     
    -trait UnsafeProjectionCreator {
    +/**
    + * The factory object for `UnsafeProjection`.
    + */
    +object UnsafeProjection extends CodegenObjectFactory[Seq[Expression], 
UnsafeProjection] {
    --- End diff --
    
    seems to make it a class is a good idea, we can set default valule like
    ```
    class UnsafeProjection(mode: CodegenObjectFactoryMode = 
CodegenObjectFactoryMode.currentMode)
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to