-
Notifications
You must be signed in to change notification settings - Fork 155
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
Attribute lineage: Dependency from aggregation expressions to preceding selection operations #791
Comments
@wajda I'd say might also depend on |
Yes, correct, of course, it's just an oversight in description. Thanks for pointing it out! :) |
Just making a quick note of an idea. This problem can be modeled in the following way. Every operation can have properties like if it potentially changes the number of rows (e.g. Then, on the expression definition level it could be specified if the expression is an aggregation, and if it's commutative. Pseudo code: trait OperationLike {
...
def properties: Option[OperationProperties]
}
class OperationProperties (
val resize: Option[Boolean | AttrOrExprRef] = false
val reorder: Option[Boolean | AttrOrExprRef] = false
)
trait ExpressionLike {
...
def isAggregation: Boolean = false
def isCommutative: Boolean = false
} So, considering example from the issue description, operations: [
{
name: "WHERE",
properties: {
resize: {__exprId: "expr-111"}
}
}
]
attributes: [
{
id: "attr-a",
name: "a"
},
{
id: "attr-b",
name: "b",
childRefs: [{__exprId: "expr-222"}]
},
]
expressions: [
{
id: "expr-111",
name: "c"
},
{
id: "expr-222",
name: "AGG",
isAggregation: true,
childRefs: [{__exprId: "attr-a"}]
},
] As seen, the attribute If the A note for further thinking - how to model e.g. |
In the following pseudo query, output attribute
b
should depend not only ona
, but also onc
andg
even though they are not directly present inb
's AST.The text was updated successfully, but these errors were encountered: