You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/01 09:14:15 UTC

[GitHub] [flink] sunshineJK opened a new pull request, #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

sunshineJK opened a new pull request, #20127:
URL: https://github.com/apache/flink/pull/20127

   …ecimal type was converted to scientific notation
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)*
   
   
   ## Brief change log
   
   *(for example:)*
     - *The TaskInfo is stored in the blob store on job creation time as a persistent artifact*
     - *Deployments RPC transmits only the blob storage reference*
     - *TaskManagers retrieve the TaskInfo from the blob cache*
   
   
   ## Verifying this change
   
   Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (100MB)*
     - *Extended integration test for recovery after master (JobManager) failure*
     - *Added test that validates that TaskInfo is transferred only once across recoveries*
     - *Manually verified the change by running a 4 node cluster with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
     - The serializers: (yes / no / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / no / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
     - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916412128


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("disable-write-bigdecimal-as-scientific-notation")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription(
+                            "Disabled representation of data of type Bigdecimal as scientific notation (default is false, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If false the result is '1E+5', if true the result is 100000.");
+
     private CsvFormatOptions() {}

Review Comment:
   hi,@afedulov I've changed this parameter and now the default is false



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1187054304

   Hi @MartijnVisser , What should I do next


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915458758


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   The current default value is equal to "standard" Jackson



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] PatrickRen commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
PatrickRen commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914383609


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvCommons.java:
##########
@@ -35,6 +35,7 @@
 import static org.apache.flink.formats.csv.CsvFormatOptions.IGNORE_PARSE_ERRORS;
 import static org.apache.flink.formats.csv.CsvFormatOptions.NULL_LITERAL;
 import static org.apache.flink.formats.csv.CsvFormatOptions.QUOTE_CHARACTER;
+import static org.apache.flink.formats.csv.CsvFormatOptions.WRITE_BIGDECIMAL_AS_PLAIN;

Review Comment:
   I'm not quite familiar with Jackson but I think we need a test at least. @sunshineJK Could you add a test case to validate this feature? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915190625


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvRowDataSerializationSchema.java:
##########
@@ -128,8 +132,12 @@ public Builder setNullLiteral(String s) {
             return this;
         }
 
+        public void setBigDecimalAsPlain(boolean plain) {

Review Comment:
   Strictly speaking, after the changes in this PR, `CsvRowDataSerializationSchema` with this parameter set to true cannot be considered to be equal to the one where it is set to false (equals() method).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1172139102

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "5f99a41a6427a0a4b42fe7cc66458868b8c7ab3e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "5f99a41a6427a0a4b42fe7cc66458868b8c7ab3e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5f99a41a6427a0a4b42fe7cc66458868b8c7ab3e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914455481


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvCommons.java:
##########
@@ -35,6 +35,7 @@
 import static org.apache.flink.formats.csv.CsvFormatOptions.IGNORE_PARSE_ERRORS;
 import static org.apache.flink.formats.csv.CsvFormatOptions.NULL_LITERAL;
 import static org.apache.flink.formats.csv.CsvFormatOptions.QUOTE_CHARACTER;
+import static org.apache.flink.formats.csv.CsvFormatOptions.WRITE_BIGDECIMAL_AS_PLAIN;

Review Comment:
   hello,I submitted the test case @PatrickRen @MartijnVisser 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1185660987

   Hi @sunshineJK almost there. The comment on the option still needs to be fixed. The grammar is off (**e**nable**D** -> **E**nables), "of data of type Bigdecimal"  -> "of BigDecimal data type",  the datatypes needs fixing (Bigdecimal -> Big**D**ecimal), "as scientific notation" ->  "**in** scientific notation" and the comment is in general a bit too verbose. Did you consider the variant that I proposed in the last review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914455481


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvCommons.java:
##########
@@ -35,6 +35,7 @@
 import static org.apache.flink.formats.csv.CsvFormatOptions.IGNORE_PARSE_ERRORS;
 import static org.apache.flink.formats.csv.CsvFormatOptions.NULL_LITERAL;
 import static org.apache.flink.formats.csv.CsvFormatOptions.QUOTE_CHARACTER;
+import static org.apache.flink.formats.csv.CsvFormatOptions.WRITE_BIGDECIMAL_AS_PLAIN;

Review Comment:
   hello,I submitted the test case



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915193253


##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -3,7 +3,7 @@ title: CSV
 weight: 2
 type: docs
 aliases:
-  - /zh/dev/table/connectors/formats/csv.html

Review Comment:
   Is this change necessary?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915190625


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvRowDataSerializationSchema.java:
##########
@@ -128,8 +132,12 @@ public Builder setNullLiteral(String s) {
             return this;
         }
 
+        public void setBigDecimalAsPlain(boolean plain) {

Review Comment:
   Strictly speaking, after the changes in this PR, `CsvRowDataSerializationSchema` with this setting cannot be considered to be equal to the one without (equals() method).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915200376


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   This option is set to false [in Jackson by default](https://fasterxml.github.io/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.Feature.html#:~:text=disabled%20by%20default.-,WRITE_BIGDECIMAL_AS_PLAIN,-public%20static%20final)
   Don't you think this might cause issues for the users to expect the "standard" Jackson CSV behavior out of the box?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916736460


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,11 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
-    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
-            ConfigOptions.key("write-bigdecimal-as-plain")
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =

Review Comment:
   Why not just `WRITE_BIGDECIMAL_IN_SCIENTIFIC_NOTATION` without DISABLE? The boolean already incorporates this notion. (also mind IN instead of AS)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914385236


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvCommons.java:
##########
@@ -35,6 +35,7 @@
 import static org.apache.flink.formats.csv.CsvFormatOptions.IGNORE_PARSE_ERRORS;
 import static org.apache.flink.formats.csv.CsvFormatOptions.NULL_LITERAL;
 import static org.apache.flink.formats.csv.CsvFormatOptions.QUOTE_CHARACTER;
+import static org.apache.flink.formats.csv.CsvFormatOptions.WRITE_BIGDECIMAL_AS_PLAIN;

Review Comment:
   Okay, I'll add that test case later



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915399942


##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -3,7 +3,7 @@ title: CSV
 weight: 2
 type: docs
 aliases:
-  - /zh/dev/table/connectors/formats/csv.html

Review Comment:
   sorry, I will revert



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916163668


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   Are you sure?
   https://github.com/FasterXML/jackson-core/blob/5a8ed0824491a1910aeea4ca7164150f13e4e446/src/main/java/com/fasterxml/jackson/core/JsonGenerator.java#L201



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914454548


##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -3,7 +3,7 @@ title: CSV
 weight: 2
 type: docs
 aliases:
-  - /zh/dev/table/connectors/formats/csv.html
+- /dev/table/connectors/formats/csv.html

Review Comment:
   Has been updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r921120298


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvRowDataSerializationSchema.java:
##########
@@ -128,8 +132,13 @@ public Builder setNullLiteral(String s) {
             return this;
         }
 
+        public void setBigDecimalInScientificNotation(boolean isScientificNotation) {

Review Comment:
   Nit:
   Let's for consistency use the full property name, similar to the other settings.
   `setWriteBigDecimalInScientificNotation`



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_IN_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("write-bigdecimal-in-scientific-notation")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            "enabled representation of data of type Bigdecimal as scientific notation (default is true, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If true the result is '1E+5', if false the result is 100000.");

Review Comment:
   How about:
   > Switches on the representation of BigDecimal data type to scientific notation. When enabled, a BigDecimal number that is larger than 100000, is represented as '1E+5'.
   
   Btw, does that only apply starting from E+5? What about 1000?



##########
flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java:
##########
@@ -230,6 +235,33 @@ public void testInvalidIgnoreParseError() {
         createTableSink(SCHEMA, options);
     }
 
+    @Test
+    public void testSerializationWithWriteBigdecimalAsPlain() {

Review Comment:
   Nit:
   The test name should probably reflect the property name change.
   Probably also testing the default path of seeing the "1e+5" should be added to ensure that the setting actually changes the behavior (unless it is tested elsewhere).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1185475290

   hi @afedulov Please review it again


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1186037818

   > 
   Thank you , I'm going to modify it a little bit.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1187051264

   > Thanks, @sunshineJK. LGTM.
   @afedulov Thank you for your advice. I have gained a lot.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] MartijnVisser merged pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
MartijnVisser merged PR #20127:
URL: https://github.com/apache/flink/pull/20127


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1179279118

   hi @afedulov , Parameter name has been modified, thank you for your suggestion


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915200376


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   This option is set to false [in Jackson by default](https://fasterxml.github.io/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.Feature.html#:~:text=disabled%20by%20default.-,WRITE_BIGDECIMAL_AS_PLAIN,-public%20static%20final)
   Don't you think this might cause issues for the users that expect the "standard" Jackson CSV behavior out of the box?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1189661563

   Hi @afedulov @MartijnVisser @PatrickRen What are the next steps? Do I need to do any more operations


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r914454663


##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -29,18 +29,17 @@ under the License.
 {{< label "Format: Serialization Schema" >}}
 {{< label "Format: Deserialization Schema" >}}
 
-[CSV](https://zh.wikipedia.org/wiki/%E9%80%97%E5%8F%B7%E5%88%86%E9%9A%94%E5%80%BC) Format 允许我们基于 CSV schema 进行解析和生成 CSV 数据。 目前 CSV schema 是基于 table schema 推断而来的。

Review Comment:
   Has been updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916736460


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,11 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
-    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
-            ConfigOptions.key("write-bigdecimal-as-plain")
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =

Review Comment:
   Why not just `WRITE_BIGDECIMAL_IN_SCIENTIFIC_NOTATION` without DISABLE? The boolean already incorporates the notion of on/off and I do not see a benefit in negating the predicate that clearly states the outcome. (also mind IN instead of AS)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916163668


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   Are you sure? I see that our default value os `true`, whereas Jackson sets it to false.
   https://github.com/FasterXML/jackson-core/blob/5a8ed0824491a1910aeea4ca7164150f13e4e446/src/main/java/com/fasterxml/jackson/core/JsonGenerator.java#L201



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   Are you sure? I see that our default value is `true`, whereas Jackson sets it to false.
   https://github.com/FasterXML/jackson-core/blob/5a8ed0824491a1910aeea4ca7164150f13e4e446/src/main/java/com/fasterxml/jackson/core/JsonGenerator.java#L201



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915192689


##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -3,7 +3,7 @@ title: CSV
 weight: 2
 type: docs
 aliases:
-  - /zh/dev/table/connectors/formats/csv.html

Review Comment:
   Is this change necessary?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1182668416

   hello @MartijnVisser @afedulov @PatrickRen  , Do you have any suggestions for the latest submission ? Thank you


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1182883181

   > Hi @sunshineJK, I can take a look on Friday, sorry, a very busy week.
   
   OK,thank you


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on PR #20127:
URL: https://github.com/apache/flink/pull/20127#issuecomment-1182880368

   Hi @sunshineJK, I can take a look on Friday, sorry, a very busy week.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916412976


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("disable-write-bigdecimal-as-scientific-notation")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription(
+                            "Disabled representation of data of type Bigdecimal as scientific notation (default is false, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If false the result is '1E+5', if true the result is 100000.");
+
     private CsvFormatOptions() {}

Review Comment:
   hi,@afedulov I've changed this parameter and now the default is false.And change the parameter name to disable-write-bigdecimal-as-scientific-notation



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvRowDataSerializationSchema.java:
##########
@@ -128,8 +132,13 @@ public Builder setNullLiteral(String s) {
             return this;
         }
 
+        public void setBigDecimalInScientificNotation(boolean isScientificNotation) {

Review Comment:
   Yes, you are right



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   Thank you, I understand what you mean, but I think the current description is easier for users to understand.



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,11 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
-    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
-            ConfigOptions.key("write-bigdecimal-as-plain")
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("disable-write-bigdecimal-as-scientific-notation")
                     .booleanType()
-                    .defaultValue(true)
-                    .withDescription("Optional whether write bigdecimal using scientific notation");
+                    .defaultValue(false)
+                    .withDescription(
+                            "Disabled representation of data of type Bigdecimal as scientific notation (default is false, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If false the result is '1E+5', if true the result is 100000.");

Review Comment:
   Thank you for your advice. I will try to improve it



##########
flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java:
##########
@@ -230,6 +235,33 @@ public void testInvalidIgnoreParseError() {
         createTableSink(SCHEMA, options);
     }
 
+    @Test
+    public void testSerializationWithWriteBigdecimalAsPlain() {

Review Comment:
   Roger that. Next commit added



##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_IN_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("write-bigdecimal-in-scientific-notation")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            "enabled representation of data of type Bigdecimal as scientific notation (default is true, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If true the result is '1E+5', if false the result is 100000.");

Review Comment:
   Only when the value is not 0 and a multiple of 10 is converted to scientific notation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] MartijnVisser commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r913673950


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvCommons.java:
##########
@@ -35,6 +35,7 @@
 import static org.apache.flink.formats.csv.CsvFormatOptions.IGNORE_PARSE_ERRORS;
 import static org.apache.flink.formats.csv.CsvFormatOptions.NULL_LITERAL;
 import static org.apache.flink.formats.csv.CsvFormatOptions.QUOTE_CHARACTER;
+import static org.apache.flink.formats.csv.CsvFormatOptions.WRITE_BIGDECIMAL_AS_PLAIN;

Review Comment:
   @afedulov or @PatrickRen any opinions about this solution implementation?



##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -29,18 +29,17 @@ under the License.
 {{< label "Format: Serialization Schema" >}}
 {{< label "Format: Deserialization Schema" >}}
 
-[CSV](https://zh.wikipedia.org/wiki/%E9%80%97%E5%8F%B7%E5%88%86%E9%9A%94%E5%80%BC) Format 允许我们基于 CSV schema 进行解析和生成 CSV 数据。 目前 CSV schema 是基于 table schema 推断而来的。

Review Comment:
   You have updated the Chinese documentation with English content. The English content can be found in `docs/content/docs/connectors/table/formats/csv.md` - Please make sure that at least the English one has the right documentation



##########
docs/content.zh/docs/connectors/table/formats/csv.md:
##########
@@ -3,7 +3,7 @@ title: CSV
 weight: 2
 type: docs
 aliases:
-  - /zh/dev/table/connectors/formats/csv.html
+- /dev/table/connectors/formats/csv.html

Review Comment:
   Please revert, the original value was correct



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916163668


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)

Review Comment:
   Are you sure? I see that our default value is `true`, whereas Jackson sets it to false.
   https://github.com/FasterXML/jackson-core/blob/2.13/src/main/java/com/fasterxml/jackson/core/JsonGenerator.java
   
   BTW, we can probably also reuse a part of  their JavaDoc for this option almost verbatim.  We just pass it through to Jackson anyhow, so there is no need to invent a different interpretation, but it is up to you:
   https://github.com/FasterXML/jackson-core/blob/2.13/src/main/java/com/fasterxml/jackson/core/JsonGenerator.java#L188-L190
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] sunshineJK commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
sunshineJK commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915458318


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription("Optional whether write bigdecimal using scientific notation");

Review Comment:
   Thank you for your advice,I've made some updates



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r916739165


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,11 +87,12 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
-    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
-            ConfigOptions.key("write-bigdecimal-as-plain")
+    public static final ConfigOption<Boolean> DISABLE_WRITE_BIGDECIMAL_AS_SCIENTIFIC_NOTATION =
+            ConfigOptions.key("disable-write-bigdecimal-as-scientific-notation")
                     .booleanType()
-                    .defaultValue(true)
-                    .withDescription("Optional whether write bigdecimal using scientific notation");
+                    .defaultValue(false)
+                    .withDescription(
+                            "Disabled representation of data of type Bigdecimal as scientific notation (default is false, which requires conversion to scientific notation), e.g. A Bigdecimal number of 100000, If false the result is '1E+5', if true the result is 100000.");

Review Comment:
   `DisableS`
   as -> in



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] afedulov commented on a diff in pull request #20127: [FLINK-26270] Flink SQL write data to kafka by CSV format , whether d…

Posted by GitBox <gi...@apache.org>.
afedulov commented on code in PR #20127:
URL: https://github.com/apache/flink/pull/20127#discussion_r915198709


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFormatOptions.java:
##########
@@ -87,5 +87,11 @@ public class CsvFormatOptions {
                             "Optional null literal string that is interpreted as a\n"
                                     + "null value (disabled by default)");
 
+    public static final ConfigOption<Boolean> WRITE_BIGDECIMAL_AS_PLAIN =
+            ConfigOptions.key("write-bigdecimal-as-plain")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription("Optional whether write bigdecimal using scientific notation");

Review Comment:
   This needs a better comment since the relationship between the flag values and the scientific notation is not immediately clear to the user of the API. The comment has to explain what is the outcome if this flag is set to true.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org