org.apache.spark.sql.catalyst.analysis.Analyzer
Name for this rule, automatically inferred based on class name.
Name for this rule, automatically inferred based on class name.
In many dialects of SQL it is valid to sort by attributes that are not present in the SELECT clause. This rule detects such queries and adds the required attributes to the original projection, so that they will be available during sorting. Another projection is added to remove these attributes after sorting.
The HAVING clause could also used a grouping columns that is not presented in the SELECT.