Skip to content

Conversation

@liancheng
Copy link
Contributor

What changes were proposed in this pull request?

This PR fixes a minor formatting issue of WindowSpecDefinition.sql when no partitioning expressions are present.

Before:

( ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

After:

(ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

How was this patch tested?

New test case added in ExpressionSQLBuilderSuite.

@SparkQA
Copy link

SparkQA commented Jul 24, 2016

Test build #62770 has finished for PR 14334 at commit 9835569.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jul 24, 2016

Can you add a JIRA ticket?

@dongjoon-hyun
Copy link
Member

Hi, @liancheng .
The failure is due to LogicalPlanToSQLSuite. It verifies the generated SQLs. Please use the following command to update the generated SQL answer sets.

SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "hive/test-only *LogicalPlanToSQLSuite"

@liancheng liancheng changed the title [MINOR][SQL] Fixes window specification SQL format [SPARK-16703][SQL] Fixes window specification SQL format Jul 25, 2016
@liancheng
Copy link
Contributor Author

@rxin @dongjoon-hyun Thanks! JIRA ticket added and updated the golden files.

@rxin
Copy link
Contributor

rxin commented Jul 25, 2016

BTW can you change the title to say "Remove extra whitespace in SQL generation for window functions"?

@SparkQA
Copy link

SparkQA commented Jul 25, 2016

Test build #62797 has finished for PR 14334 at commit 5f051dc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor

LGTM

@dongjoon-hyun
Copy link
Member

After merging this PR, I will rebase my PR #14257 .
Both PRs are related to SQL generations.

@liancheng liancheng changed the title [SPARK-16703][SQL] Fixes window specification SQL format [SPARK-16703][SQL] Remove extra whitespace in SQL generation for window functions Jul 25, 2016
@liancheng
Copy link
Contributor Author

@rxin PR title updated.

@rxin
Copy link
Contributor

rxin commented Jul 25, 2016

Merging in master/2.0.

@asfgit asfgit closed this in 7ea6d28 Jul 25, 2016
asfgit pushed a commit that referenced this pull request Jul 25, 2016
…ow functions

## What changes were proposed in this pull request?

This PR fixes a minor formatting issue of `WindowSpecDefinition.sql` when no partitioning expressions are present.

Before:

```sql
( ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
```

After:

```sql
(ORDER BY `a` ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
```

## How was this patch tested?

New test case added in `ExpressionSQLBuilderSuite`.

Author: Cheng Lian <lian@databricks.com>

Closes #14334 from liancheng/window-spec-sql-format.

(cherry picked from commit 7ea6d28)
Signed-off-by: Reynold Xin <rxin@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants