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 2021/01/29 15:03:07 UTC

[GitHub] [flink] sharkdtu opened a new pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

sharkdtu opened a new pull request #14813:
URL: https://github.com/apache/flink/pull/14813


   source table with 'csv.disable-quote-character' = 'true' can not take effect.
   
   ```
   Caused by: org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException: Missing closing quote for value
    at [Source: UNKNOWN; line: 1, column: 29]
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1840)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:712)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.csv.CsvParser._reportParsingError(CsvParser.java:1250)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.csv.impl.CsvDecoder._nextQuotedString(CsvDecoder.java:785)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.csv.impl.CsvDecoder.nextString(CsvDecoder.java:630)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.csv.CsvParser._handleNextEntry(CsvParser.java:846)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.csv.CsvParser.nextFieldName(CsvParser.java:665)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer.deserializeObject(JsonNodeDeserializer.java:249)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:68)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:15)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1719)
   	at org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1282)
   	at org.apache.flink.formats.csv.CsvRowDataDeserializationSchema.deserialize(CsvRowDataDeserializationSchema.java:155)
   	... 30 more
   
   ```
   


----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741",
       "triggerID" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * 20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739) 
   * e62dce932ddff3d8375e11ce822302d65e5eb7a8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ab61d899b8b08c6c4707ba65f922c4a838bdbb6e Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667) 
   * e5f633baea6ed961c21635feedab97683c429def UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot commented on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ab61d899b8b08c6c4707ba65f922c4a838bdbb6e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567589468



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {

Review comment:
       `CsvFormatFactoryTest` is used to verify the received options can be converted into expected serializer/deserializer. The parse/unparse logic should be tested in `CsvRowDataSerDeSchemaTest`. 
   
   Could you add a test in `CsvRowDataSerDeSchemaTest` to test deserialization with quote disabled ? And add a DeserializationSchema assertEquals test in `CsvFormatFactoryTest#testDisableQuoteCharacter`?




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * 20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739) 
   * e62dce932ddff3d8375e11ce822302d65e5eb7a8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * ab61d899b8b08c6c4707ba65f922c4a838bdbb6e Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] sharkdtu commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567551672



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       It can throw exception when 'csv.disable-quote-character' is set false (default value), because it does not find closed quota of `"abc`. But when 'csv.disable-quote-character' is set ture, it shouldn't throw excetpion as it will ignore quote character. Actually, this didn't take effect. So this pr fix this bug.




----------------------------------------------------------------
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.

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



[GitHub] [flink] wuchong closed pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong closed pull request #14813:
URL: https://github.com/apache/flink/pull/14813


   


----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e5f633baea6ed961c21635feedab97683c429def Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ab61d899b8b08c6c4707ba65f922c4a838bdbb6e Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769859353


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit e62dce932ddff3d8375e11ce822302d65e5eb7a8 (Fri May 28 08:15:58 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * 20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741",
       "triggerID" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * e62dce932ddff3d8375e11ce822302d65e5eb7a8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741",
       "triggerID" : "e62dce932ddff3d8375e11ce822302d65e5eb7a8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12739) 
   * e62dce932ddff3d8375e11ce822302d65e5eb7a8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12741) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567807783



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvRowDataSerDeSchemaTest.java
##########
@@ -299,6 +299,27 @@ public void testSerializeDeserializeNestedTypes() throws Exception {
         testSerDeConsistency(nullRow, serSchemaBuilder, deserSchemaBuilder);
     }
 
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testDeserializationWithDisableQuoteCharacter() throws Exception {

Review comment:
       We can simplify the test into following to reuse the logic of constructing schema and rows. 
   
   ```scala
       @Test
       public void testDeserializationWithQuoteCharacterDisabled() throws Exception {
           Consumer<CsvRowDataDeserializationSchema.Builder> deserConfig =
                   (deserSchemaBuilder) ->
                           deserSchemaBuilder
                                   .setEscapeCharacter('*')
                                   .disableQuoteCharacter()
                                   .setArrayElementDelimiter(":")
                                   .setFieldDelimiter(';');
   
           testFieldDeserialization(STRING(), "\"abc", "\"abc", deserConfig, ";");
       }
   ```




----------------------------------------------------------------
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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567584364



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       Thanks for the explanation. 




----------------------------------------------------------------
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.

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



[GitHub] [flink] sharkdtu commented on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-770156048


   @flinkbot run azure


----------------------------------------------------------------
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.

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



[GitHub] [flink] sharkdtu commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567551672



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       It can throw exception when 'csv.disable-quote-character' is set false (default value), because it does not find closed quotation 
    of '\"abc'. But when 'csv.disable-quote-character' is set ture, it shouldn't throw excetpion as it will ignore quote character. Actually, this didn't take effect. So this pr fix this bug.




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "770791591",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   *  Unknown: [CANCELED](TBD) 
   * 20ecfd03d2141aed82037ec9f3c5b76aa45b2d6e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567548368



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       Shouldn't this throw exception because we quote is disabled `csv.disable-quote-character=true`.

##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       Shouldn't this throw exception because we quote is disabled `csv.disable-quote-character=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.

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



[GitHub] [flink] wuchong closed pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong closed pull request #14813:
URL: https://github.com/apache/flink/pull/14813


   


----------------------------------------------------------------
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.

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



[GitHub] [flink] sharkdtu commented on pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-770791591


   @flinkbot run azure


----------------------------------------------------------------
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.

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



[GitHub] [flink] sharkdtu commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567551672



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {
+        // test deserialization schema
+        final Map<String, String> options =
+                getModifiedOptions(
+                        opts -> {
+                            opts.put("csv.disable-quote-character", "true");
+                            opts.remove("csv.quote-character");
+                        });
+
+        final DynamicTableSource actualSource = createTableSource(options);
+        assert actualSource instanceof TestDynamicTableFactory.DynamicTableSourceMock;
+        TestDynamicTableFactory.DynamicTableSourceMock sourceMock =
+                (TestDynamicTableFactory.DynamicTableSourceMock) actualSource;
+
+        DeserializationSchema<RowData> deserializationSchema =
+                sourceMock.valueFormat.createRuntimeDecoder(
+                        ScanRuntimeProviderContext.INSTANCE, SCHEMA.toRowDataType());
+        RowData expected = GenericRowData.of(fromString("\"abc"), 123, false);
+        RowData actual = deserializationSchema.deserialize("\"abc;123;false".getBytes());

Review comment:
       It can throw exception when 'csv.disable-quote-character' is set false (default value), because it does not find closed quota 
    of "abc. But when 'csv.disable-quote-character' is set ture, it shouldn't throw excetpion as it will ignore quote character. Actually, this didn't take effect. So this pr fix this bug.




----------------------------------------------------------------
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.

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



[GitHub] [flink] flinkbot commented on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

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


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit ab61d899b8b08c6c4707ba65f922c4a838bdbb6e (Fri Jan 29 15:06:01 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-21207).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.

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



[GitHub] [flink] flinkbot edited a comment on pull request #14813: [FLINK-21207] Fix 'csv.disable-quote-character' can not take effect during deserial…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14813:
URL: https://github.com/apache/flink/pull/14813#issuecomment-769867480


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab61d899b8b08c6c4707ba65f922c4a838bdbb6e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667",
       "triggerID" : "770156048",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "e5f633baea6ed961c21635feedab97683c429def",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689",
       "triggerID" : "e5f633baea6ed961c21635feedab97683c429def",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ab61d899b8b08c6c4707ba65f922c4a838bdbb6e Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12667) 
   * e5f633baea6ed961c21635feedab97683c429def Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12689) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.

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



[GitHub] [flink] sharkdtu commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
sharkdtu commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567752093



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {

Review comment:
       ok




----------------------------------------------------------------
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.

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



[GitHub] [flink] wuchong commented on a change in pull request #14813: [FLINK-21207] Fix source table with 'csv.disable-quote-character' = 'true' can not take effect

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14813:
URL: https://github.com/apache/flink/pull/14813#discussion_r567808475



##########
File path: flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
##########
@@ -206,6 +206,29 @@ public void testDeserializeWithEscapedFieldDelimiter() throws IOException {
         assertEquals(expected, actual);
     }
 
+    @Test
+    public void testDeserializeWithDisableQuoteCharacter() throws IOException {

Review comment:
       We can remove this method now, because it has been covered by the new introduced other 2 tests. 




----------------------------------------------------------------
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.

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