-
Notifications
You must be signed in to change notification settings - Fork 58
[CORE] .hiverc is loaded twice making create function throw exception #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Could you add |
|
.hiverc -> |
| sc = spark.sparkContext | ||
| processInitFile(conf) | ||
| // we shouldn't load .hiverc twice | ||
| // processInitFile(conf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
processInitFile is only used for load .hiverc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
processInitFileis only used for load.hiverc?
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change coment as 'Don't call processInitFile again to avoid load .hiverc twice.'
…45 **What changes were proposed in this pull request** If user's `.hiverc` contains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of local `SparkSession`'s `XSQLSessionCatalog` in the beginning. When some sql causes `SparkSession` restart to run on yarn, the old `XSQLSessionCatalog` is passed to new started `SparkSession`. It's meaning that funA has existed in functionRegistry. So we should not run `.hiverc` again after SparkSession is restarted.
…45 **What changes were proposed in this pull request** If user's `.hiverc` contains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of local `SparkSession`'s `XSQLSessionCatalog` in the beginning. When some sql causes `SparkSession` restart to run on yarn, the old `XSQLSessionCatalog` is passed to new started `SparkSession`. It's meaning that funA has existed in functionRegistry. So we should not run `.hiverc` again after SparkSession is restarted.
|
Thanks! Merged to master and branch-0.6 |
What changes were proposed in this pull request
If user's
.hiverccontains sql like 'create temporary function funA as xx.xx', bin/spark-xsql will register it in functionRegistry of localSparkSession'sXSQLSessionCatalogin the beginning. When some sql causesSparkSessionrestart to run on yarn, the oldXSQLSessionCatalogis passed to new startedSparkSession. It's meaning that funA has existed in functionRegistry. So we should not run.hivercagain after SparkSession is restarted.