You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Nadav Samet (JIRA)" <ji...@apache.org> on 2018/02/25 00:01:00 UTC

[jira] [Created] (SPARK-23511) Catalyst: Implement GetField

Nadav Samet created SPARK-23511:
-----------------------------------

             Summary: Catalyst: Implement GetField
                 Key: SPARK-23511
                 URL: https://issues.apache.org/jira/browse/SPARK-23511
             Project: Spark
          Issue Type: New Feature
          Components: SQL
    Affects Versions: 2.2.1
            Reporter: Nadav Samet


Similar to Invoke, InvokeStatic and NewInstance, it would be nice to have GetStaticField(expression, fieldName).

My use case is invoking a method on a companion object given the class of the companion object itself - it turns out they are not static. I'd like to be able to do something like this:

Invoke(GetStaticField(cls, "MODULE$", ...), "someMethod", ...)

My workaround is passing the companion to Invoke() directly to Literal.fromObject but I think having a general solution to call method on companion objects would be better.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org