Skip to content

Conversation

@beliefer
Copy link
Contributor

@beliefer beliefer commented May 12, 2023

What changes were proposed in this pull request?

Spark 3.4.0 released the new syntax: OFFSET clause.
But the SQL reference missing the description for it.

Why are the changes needed?

Adds SQL reference for OFFSET clause.

Does this PR introduce any user-facing change?

'Yes'.
Users could find out the SQL reference for OFFSET clause.

How was this patch tested?

Manual verify.
image
image
image
image

@github-actions github-actions bot added the DOCS label May 12, 2023
@beliefer beliefer changed the title [SPARK-43483][SQL][DOC] Adds SQL references for OFFSET clause. [SPARK-43483][SQL][DOCS] Adds SQL references for OFFSET clause. May 12, 2023
@beliefer
Copy link
Contributor Author

ping @cloud-fan

org.apache.spark.sql.AnalysisException: The limit expression must evaluate to a constant value ...
org.apache.spark.sql.AnalysisException
{
"errorClass" : "_LEGACY_ERROR_TEMP_2400",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are documenting this error, can we assign an official error class name to it?

Copy link
Contributor

@cloud-fan cloud-fan May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, is this really what the end users will see? A JSON string?


-- A non-foldable expression as an input to OFFSET is not allowed.
SELECT name, age FROM person ORDER BY name OFFSET length(name);
org.apache.spark.sql.AnalysisException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.4!

@cloud-fan cloud-fan closed this in e1114e8 May 15, 2023
cloud-fan pushed a commit that referenced this pull request May 15, 2023
### What changes were proposed in this pull request?
Spark 3.4.0 released the new syntax: `OFFSET clause`.
But the SQL reference missing the description for it.

### Why are the changes needed?
Adds SQL reference for `OFFSET` clause.

### Does this PR introduce _any_ user-facing change?
'Yes'.
Users could find out the SQL reference for `OFFSET` clause.

### How was this patch tested?
Manual verify.
![image](https://github.com/apache/spark/assets/8486025/55398194-5193-45eb-ac04-10f5f0793f7f)
![image](https://github.com/apache/spark/assets/8486025/fef0abc1-7dfa-44e2-b2e0-a56fa82a0817)
![image](https://github.com/apache/spark/assets/8486025/5ab9dc39-6812-45b4-a758-85668ab040f1)
![image](https://github.com/apache/spark/assets/8486025/b726abd4-daae-4de4-a78e-45120573e699)

Closes #41151 from beliefer/SPARK-43483.

Authored-by: Jiaan Geng <beliefer@163.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@beliefer
Copy link
Contributor Author

@cloud-fan @HyukjinKwon Thank you for all!

snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
### What changes were proposed in this pull request?
Spark 3.4.0 released the new syntax: `OFFSET clause`.
But the SQL reference missing the description for it.

### Why are the changes needed?
Adds SQL reference for `OFFSET` clause.

### Does this PR introduce _any_ user-facing change?
'Yes'.
Users could find out the SQL reference for `OFFSET` clause.

### How was this patch tested?
Manual verify.
![image](https://github.com/apache/spark/assets/8486025/55398194-5193-45eb-ac04-10f5f0793f7f)
![image](https://github.com/apache/spark/assets/8486025/fef0abc1-7dfa-44e2-b2e0-a56fa82a0817)
![image](https://github.com/apache/spark/assets/8486025/5ab9dc39-6812-45b4-a758-85668ab040f1)
![image](https://github.com/apache/spark/assets/8486025/b726abd4-daae-4de4-a78e-45120573e699)

Closes apache#41151 from beliefer/SPARK-43483.

Authored-by: Jiaan Geng <beliefer@163.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
GladwinLee pushed a commit to lyft/spark that referenced this pull request Oct 10, 2023
### What changes were proposed in this pull request?
Spark 3.4.0 released the new syntax: `OFFSET clause`.
But the SQL reference missing the description for it.

### Why are the changes needed?
Adds SQL reference for `OFFSET` clause.

### Does this PR introduce _any_ user-facing change?
'Yes'.
Users could find out the SQL reference for `OFFSET` clause.

### How was this patch tested?
Manual verify.
![image](https://github.com/apache/spark/assets/8486025/55398194-5193-45eb-ac04-10f5f0793f7f)
![image](https://github.com/apache/spark/assets/8486025/fef0abc1-7dfa-44e2-b2e0-a56fa82a0817)
![image](https://github.com/apache/spark/assets/8486025/5ab9dc39-6812-45b4-a758-85668ab040f1)
![image](https://github.com/apache/spark/assets/8486025/b726abd4-daae-4de4-a78e-45120573e699)

Closes apache#41151 from beliefer/SPARK-43483.

Authored-by: Jiaan Geng <beliefer@163.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
catalinii pushed a commit to lyft/spark that referenced this pull request Oct 10, 2023
### What changes were proposed in this pull request?
Spark 3.4.0 released the new syntax: `OFFSET clause`.
But the SQL reference missing the description for it.

### Why are the changes needed?
Adds SQL reference for `OFFSET` clause.

### Does this PR introduce _any_ user-facing change?
'Yes'.
Users could find out the SQL reference for `OFFSET` clause.

### How was this patch tested?
Manual verify.
![image](https://github.com/apache/spark/assets/8486025/55398194-5193-45eb-ac04-10f5f0793f7f)
![image](https://github.com/apache/spark/assets/8486025/fef0abc1-7dfa-44e2-b2e0-a56fa82a0817)
![image](https://github.com/apache/spark/assets/8486025/5ab9dc39-6812-45b4-a758-85668ab040f1)
![image](https://github.com/apache/spark/assets/8486025/b726abd4-daae-4de4-a78e-45120573e699)

Closes apache#41151 from beliefer/SPARK-43483.

Authored-by: Jiaan Geng <beliefer@163.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants