Injection of custom rules in session

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Injection of custom rules in session

sbelur

Hello,

Is it possible to inject extensions like that can be done with SparkSession.
The Carbon Session Builder
does not seem to use the extensions.

If this is possible, please let me know how to achieve this. I am making
this note by comparing
getOrCreate with the custom get functions in CarbonSession.


thanks
swaroop



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Injection of custom rules in session

akashrn5
hi,

extensions you mean to say rules? Did not get the question clearly



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Injection of custom rules in session

David CaiQiang
In reply to this post by sbelur
From spark 2.2, Spark can inject extensions.  
for example:
val spark = SparkSession
  .builder()
  ...
  .withExtensions(...)
  ...

CarbonSession.CarbonBuilder uses default extensions to create CarbonSession.
It doesn't inject parser, analyzer and so on.

And the extensions variable is private in the apache.spark.sql package.
 Maybe We can't get the extensions directly to inject some rules by self.

So in my opinion, we should modify CarbonBuilder to support it.




-----
Best Regards
David Cai
--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Best Regards
David Cai