-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-14349] [SQL] Issue Error Messages for Unsupported Operators/DML/DDL in SQL Context. #12134
Conversation
Test build #54835 has finished for PR 12134 at commit
|
Test build #54838 has finished for PR 12134 at commit
|
inRowFormat: RowFormatContext, | ||
recordWriter: Token, | ||
outRowFormat: RowFormatContext, | ||
recordReader: Token, | ||
schemaLess: Boolean): ScriptInputOutputSchema = null |
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.
Undo this change and throw the exception here.
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.
Done. Thank you!
Test build #54850 has finished for PR 12134 at commit
|
Test build #54851 has finished for PR 12134 at commit
|
Test build #54852 has finished for PR 12134 at commit
|
@@ -201,6 +202,31 @@ class HiveQlSuite extends SparkFunSuite with BeforeAndAfterAll { | |||
assert(plan.children.head.asInstanceOf[Generate].generator.isInstanceOf[JsonTuple]) | |||
} | |||
|
|||
test("transform query spec") { | |||
val plan1 = parser.parsePlan("select transform(a, b) using 'func' as c, d from e") |
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.
What is the reason for changing the test? Is HiveQlSuite written in a different style?
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.
: ) Let me import all the dsl from Catalyst. I have no clue why the test cases in sql/hive does not do it.
@gatorsmile we are getting there. Two minor comments. |
Test build #54868 has finished for PR 12134 at commit
|
Test build #54919 has finished for PR 12134 at commit
|
@@ -351,7 +364,8 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging { | |||
string(script), | |||
attributes, | |||
withFilter, | |||
withScriptIOSchema(inRowFormat, recordWriter, outRowFormat, recordReader, schemaLess)) | |||
withScriptIOSchema( |
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.
Nit: one line (i.e. revert this).
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.
Thanks! After we adding ctx
, it has 102 characters. Thus, have to split it into two lines.
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.
Ok, my bad :)
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.
: )
LGTM - pending rebase/merge and jenkins. |
# Conflicts: # sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
Test build #54965 has finished for PR 12134 at commit
|
retest this please |
Test build #54966 has finished for PR 12134 at commit
|
Test build #2756 has finished for PR 12134 at commit
|
Merging to master. Thanks! |
What changes were proposed in this pull request?
Currently, the weird error messages are issued if we use Hive Context-only operations in SQL Context.
For example,
Drop Table
in SQL Context, we got the following message:Script Transform
in SQL Context, we got the message:Updates:
Based on the investigation from @hvanhovell , the root cause is
visitChildren
, which is the default implementation. It always returns the result of the last defined context child. After merging the code changes from @hvanhovell , it works! Thank you @hvanhovell !How was this patch tested?
A few test cases are added.
Not sure if the same issue exist for the other operators/DDL/DML. @hvanhovell