Skip to content

Conversation

@gengliangwang
Copy link
Member

What changes were proposed in this pull request?

This is a follow-up of #27489.
It declares the ANSI SQL compliance options as experimental in the documentation.

Why are the changes needed?

The options are experimental. There can be new features/behaviors in future releases.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Generating doc

@SparkQA
Copy link

SparkQA commented Feb 15, 2020

Test build #118455 has finished for PR 27590 at commit e8837f9.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Hi, @gengliangwang . Thank you for pinging me.
Do you think the new features/behaviors will revert the existing provided behavior?

The options are experimental. There can be new features/behaviors in future releases.

@gengliangwang
Copy link
Member Author

Do you think the new features/behaviors will revert the existing provided behavior?

@dongjoon-hyun I think there can be new features for the spark.sql.ansi.enabled
For spark.sql.storeAssignmentPolicy, if spark.sql.ansi.enabled is enabled by default, then it is possible that the storeAssignmentPolicy option is replaced. Also, there can be new behaviors/policy.

<td>false</td>
<td>
When true, Spark tries to conform to the ANSI SQL specification:
(Experimental) When true, Spark tries to conform to the ANSI SQL specification:
Copy link
Member

Choose a reason for hiding this comment

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

What does Experimental mean? That is the same with the @Experimental annotation? Anyway, this statement is just copied from one in the SQL configuration document (#27459). So, instead of adding the prefix (Experimental) manually, I personally think its better to add this prefix automatically via sql/gen-sql-config-docs.py. For example, how about adding an experimental method in ConfigBuilder;

  val ANSI_ENABLED = buildConf("spark.sql.ansi.enabled")
    .experimental()
    .doc("When true, Spark tries to conform to the ANSI SQL specification: 1. Spark will " +
      "throw a runtime exception if an overflow occurs in any operation on integral/decimal " +
      "field. 2. Spark will forbid using the reserved keywords of ANSI SQL as identifiers in " +
      "the SQL parser.")
    .booleanConf
    .createWithDefault(false)

Then, the script adds (Experimental) in the head of its description.

Copy link
Member Author

Choose a reason for hiding this comment

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

@maropu I was following this one https://spark.apache.org/docs/latest/configuration.html
I think it's a good idea to add a new method in ConfigBuilder, but I prefer to keep it in this way for this PR, as the configuration table here is not generated from the code.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, I think the fix itself in this pr looks fine. cc: @dongjoon-hyun @cloud-fan @HyukjinKwon

Copy link
Member

Choose a reason for hiding this comment

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

In general, this changes make sense to me. If we have more experimental public conf, we should consider doing it in a proper way.

Regarding the ANSI mode, we need to consider the roadmap of Spark 3.x: which are still missing and what kind of behavior changes we plan to add.

HyukjinKwon pushed a commit that referenced this pull request Feb 17, 2020
…tions as experimental

### What changes were proposed in this pull request?

This is a follow-up of #27489.
It declares the ANSI SQL compliance options as experimental in the documentation.

### Why are the changes needed?

The options are experimental. There can be new features/behaviors in future releases.

### Does this PR introduce any user-facing change?

No

### How was this patch tested?

Generating doc

Closes #27590 from gengliangwang/ExperimentalAnsi.

Authored-by: Gengliang Wang <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit da2ca85)
Signed-off-by: HyukjinKwon <[email protected]>
The casting behaviours are defined as store assignment rules in the standard.
When `spark.sql.storeAssignmentPolicy` is set to `ANSI`, Spark SQL complies with the ANSI store assignment rules.

When `spark.sql.storeAssignmentPolicy` is set to `ANSI`, Spark SQL complies with the ANSI store assignment rules. This is a separate configuration because its default value is `ANSI`, while the configuration `spark.sql.ansi.enabled` is disabled by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

separate -> separated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Separate can be an adjective

sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
…tions as experimental

### What changes were proposed in this pull request?

This is a follow-up of apache#27489.
It declares the ANSI SQL compliance options as experimental in the documentation.

### Why are the changes needed?

The options are experimental. There can be new features/behaviors in future releases.

### Does this PR introduce any user-facing change?

No

### How was this patch tested?

Generating doc

Closes apache#27590 from gengliangwang/ExperimentalAnsi.

Authored-by: Gengliang Wang <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
@tanvn
Copy link
Contributor

tanvn commented May 19, 2022

@gengliangwang @dongjoon-hyun
Hi, I have a question.
In Spark 3.2.1, are spark.sql.ansi.enabled and spark.sql.storeAssignmentPolicy still considered as experimental options ?
I understand that there is an epic named ANSI enhancements in Spark 3.3 https://issues.apache.org/jira/browse/SPARK-38860 which means there will be new features for the spark.sql.ansi.enabled.
But as in https://spark.apache.org/releases/spark-release-3-2-0.html, ANSI SQL mode GA (SPARK-35030) is mentioned in the Highlights section, so I think it is not experimental anymore. Could you please give me your opinion?

@cloud-fan
Copy link
Contributor

I think we can remove the experimental mark now. What do you think? @gengliangwang

@gengliangwang
Copy link
Member Author

@tanvn nice catch!
@cloud-fan Yes I will update the docs on 3.2 and above

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.

8 participants