From 330fdc19c35680870dc0891d169e352ec447bea4 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Tue, 7 Nov 2017 11:11:43 -0500 Subject: [PATCH] SQL: Upgrade JDBC CSV library (elastic/x-pack-elasticsearch#2907) Upgrades JDBC CSV library to v1.0.34. This version contains a fix for autodetection of column types, which was broken before in tr-TR locale. relates elastic/x-pack-elasticsearch#2813 Original commit: elastic/x-pack-elasticsearch@a9b94d2969918ce44f253e26d3b85241dab3ed95 --- qa/sql/build.gradle | 4 ++-- .../org/elasticsearch/xpack/qa/sql/jdbc/CsvSpecTestCase.java | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qa/sql/build.gradle b/qa/sql/build.gradle index 76bac6d7429..0188570ccb8 100644 --- a/qa/sql/build.gradle +++ b/qa/sql/build.gradle @@ -19,7 +19,7 @@ dependencies { transitive = false } } - compile "net.sourceforge.csvjdbc:csvjdbc:1.0.31" + compile "net.sourceforge.csvjdbc:csvjdbc:1.0.34" runtime "com.h2database:h2:1.4.194" // used for running debug tests runtime 'org.antlr:antlr4-runtime:4.5.3' @@ -115,7 +115,7 @@ subprojects { transitive = false } } - testRuntime("net.sourceforge.csvjdbc:csvjdbc:1.0.31") { + testRuntime("net.sourceforge.csvjdbc:csvjdbc:1.0.34") { transitive = false } testRuntime("com.h2database:h2:1.4.194") { diff --git a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/CsvSpecTestCase.java b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/CsvSpecTestCase.java index 667ebcbef33..19bfe7222e2 100644 --- a/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/CsvSpecTestCase.java +++ b/qa/sql/src/main/java/org/elasticsearch/xpack/qa/sql/jdbc/CsvSpecTestCase.java @@ -102,9 +102,6 @@ public abstract class CsvSpecTestCase extends SpecBaseIntegrationTestCase { String header = bufferedReader.readLine(); if (!header.contains(":")) { // No type information in headers, no need to parse columns - trigger auto-detection - // TODO: Remove when type autodetection in JDBC CSV is fixed - // See https://sourceforge.net/p/csvjdbc/discussion/56965/thread/6a910831/ for more info - fail("The autodetection of types in JDBC CSV is currently broken. Please specify explicit types"); return new Tuple<>(expectedResults,""); } try (StringWriter writer = new StringWriter()) {