EMCECS / presto-s3-connector

Apache License 2.0
8 stars 3 forks source link

Change csvWriter to quote columns with field separators #82

Closed chipmaurer closed 3 years ago

chipmaurer commented 3 years ago

Signed-off-by: Chip Maurer chip.maurer@dell.com

If a VARCHAR column that is being inserted into via CsvWriter contained the field separator, the cell should have been quoted, but it was not. This fix changes the CsvWriter constructor to define a default quote character.

chipmaurer commented 3 years ago

[root@lrmk226 presto-s3-connector]# ./gradlew test -Pintegration Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Configure project : configuration ':compile'

Task :compileJava Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :test WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/root/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1m 0s 6 actionable tasks: 2 executed, 4 up-to-date