-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10741][SQL] Hive Query Having/OrderBy against Parquet table is not working #8889
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
|
cc @yhuai |
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 need to make it a case class because when a TreeNode makes copy, it copies parameters in its productIterator.
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.
You can also manually implement product as is done here, but if possible I'd like to avoid that.
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.
How about we use the following?
private[sql] case class LogicalRelation(
relation: BaseRelation,
override val output: Seq[AttributeReference])
extends LeafNode
with MultiInstanceRelation {
def this(relation: BaseRelation) = this(relation, relation.schema.toAttributes)
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.
Had a discussion with @marmbrus and @cloud-fan, we will keep it as a case class and change other places where we need to use unapply. We will also pass in a Seq[AttributeReference] and do the work of adding the correct exprIds inside LogicalRelation.
|
cc @liancheng |
|
Test build #42934 has finished for PR 8889 at commit
|
|
Test build #42945 has finished for PR 8889 at commit
|
|
Test build #42962 has finished for PR 8889 at commit
|
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's add a check to make sure that attrs and expectedOutputAttributes have the same length. Otherwise, zip will silently drop elements.
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.
Ah, i see. You check the length at line 36.
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.
Then, let's add a comment to say where we check the length.
|
Test build #42975 has finished for PR 8889 at commit
|
|
Seems it failed some tests. |
|
Test build #42986 has finished for PR 8889 at commit
|
|
@liancheng can you also take a look? |
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: seems that we don't use i here.
|
LGTM except for a few minor issues. |
|
Test build #43036 has finished for PR 8889 at commit
|
|
test this please |
|
Test build #43053 has finished for PR 8889 at commit
|
|
LGTM. Merging to master and branch 1.5. |
…s not working https://issues.apache.org/jira/browse/SPARK-10741 I choose the second approach: do not change output exprIds when convert MetastoreRelation to LogicalRelation Author: Wenchen Fan <[email protected]> Closes #8889 from cloud-fan/hot-bug. (cherry picked from commit 418e5e4) Signed-off-by: Yin Huai <[email protected]>
…s not working https://issues.apache.org/jira/browse/SPARK-10741 I choose the second approach: do not change output exprIds when convert MetastoreRelation to LogicalRelation Author: Wenchen Fan <[email protected]> Closes apache#8889 from cloud-fan/hot-bug. (cherry picked from commit 418e5e4) Signed-off-by: Yin Huai <[email protected]> (cherry picked from commit e0c3212)
https://issues.apache.org/jira/browse/SPARK-10741
I choose the second approach: do not change output exprIds when convert MetastoreRelation to LogicalRelation