Github user nico-pappagianis commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/226#discussion_r92485510
  
    --- Diff: 
phoenix-spark/src/main/scala/org/apache/phoenix/spark/SparkSqlContextFunctions.scala
 ---
    @@ -29,11 +29,13 @@ class SparkSqlContextFunctions(@transient val 
sqlContext: SQLContext) extends Se
         property will be used
      */
       def phoenixTableAsDataFrame(table: String, columns: Seq[String],
    -                               predicate: Option[String] = None, zkUrl: 
Option[String] = None,
    +                               predicate: Option[String] = None,
    +                               zkUrl: Option[String] = None,
    +                               tenantId: Option[String] = None,
                                    conf: Configuration = new Configuration): 
DataFrame = {
     
         // Create the PhoenixRDD and convert it to a DataFrame
    -    new PhoenixRDD(sqlContext.sparkContext, table, columns, predicate, 
zkUrl, conf)
    +    new PhoenixRDD(sqlContext.sparkContext, table, columns, predicate, 
zkUrl, tenantId, conf)
    --- End diff --
    
    Now we pass tenantId to PhoenixRDD so we can read tenant-specific tables as 
DataFrames


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to