Skip to content

Commit 5f5cc0b

Browse files
authored
Merge branch 'master' into SNOW-1881874-telemetry-service-availability
2 parents bd1e02c + bf16c4a commit 5f5cc0b

File tree

457 files changed

+1918
-1744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

457 files changed

+1918
-1744
lines changed

.github/workflows/build-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727
jobs:
2828
build:
2929
name: Build
30-
runs-on: ubuntu-20.04
30+
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v4
3333
- name: Build

.github/workflows/check-style.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
check-style:
99
name: Check Style
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Check Style
Binary file not shown.

CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**JDBC Driver 3.23.1**
2+
3+
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc
4+
15
**JDBC Driver 3.23.0**
26

37
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc

FIPS/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.23.1-SNAPSHOT</version>
8+
<version>3.23.1</version>
99
<relativePath>../parent-pom.xml</relativePath>
1010
</parent>
1111

1212
<artifactId>snowflake-jdbc-fips</artifactId>
13-
<version>3.23.1-SNAPSHOT</version>
13+
<version>3.23.1</version>
1414
<packaging>jar</packaging>
1515

1616
<name>snowflake-jdbc-fips</name>

FIPS/src/test/java/net/snowflake/client/AbstractDriverIT.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
3-
*/
41
package net.snowflake.client;
52

63
import static org.hamcrest.MatcherAssert.assertThat;

FIPS/src/test/java/net/snowflake/client/DontRunOnGCP.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client;
52

63
import java.lang.annotation.ElementType;

FIPS/src/test/java/net/snowflake/client/DontRunOnGithubActions.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client;
52

63
import java.lang.annotation.ElementType;

FIPS/src/test/java/net/snowflake/client/TestUtil.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
3-
*/
41
package net.snowflake.client;
52

63
import static org.hamcrest.CoreMatchers.is;

FIPS/src/test/java/net/snowflake/client/category/FipsTestSuite.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.category;
52

63
import org.junit.platform.suite.api.IncludeTags;

FIPS/src/test/java/net/snowflake/client/jdbc/ConnectionFipsIT.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2020 Snowflake Computing Inc. All right reserved.
3-
*/
41
package net.snowflake.client.jdbc;
52

63
import static org.junit.jupiter.api.Assertions.*;

TestOnly/pom.xml

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<surefire.version>3.5.1</surefire.version>
2323
<mockito.version>3.5.6</mockito.version>
2424
<netty.version>4.1.118.Final</netty.version>
25+
<apache.httpclient.version>4.5.14</apache.httpclient.version>
2526
<shadeBase>net.snowflake.client.jdbc.internal</shadeBase>
2627
</properties>
2728

@@ -31,6 +32,11 @@
3132
<artifactId>netty-common</artifactId>
3233
<version>${netty.version}</version>
3334
</dependency>
35+
<dependency>
36+
<groupId>org.apache.httpcomponents</groupId>
37+
<artifactId>httpclient</artifactId>
38+
<version>${apache.httpclient.version}</version>
39+
</dependency>
3440
<dependency>
3541
<groupId>io.netty</groupId>
3642
<artifactId>netty-buffer</artifactId>

parent-pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.23.1-SNAPSHOT</version>
8+
<version>3.23.1</version>
99
<packaging>pom</packaging>
1010

1111
<modules>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>net.snowflake</groupId>
88
<artifactId>snowflake-jdbc-parent</artifactId>
9-
<version>3.23.1-SNAPSHOT</version>
9+
<version>3.23.1</version>
1010
<relativePath>./parent-pom.xml</relativePath>
1111
</parent>
1212

1313
<!-- Maven complains about using property here, but it makes install and deploy process easier to override final package names and localization -->
1414
<artifactId>${artifactId}</artifactId>
15-
<version>3.23.1-SNAPSHOT</version>
15+
<version>3.23.1</version>
1616
<packaging>jar</packaging>
1717

1818
<name>${artifactId}</name>

src/main/java/com/snowflake/client/jdbc/SnowflakeDriver.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package com.snowflake.client.jdbc;
62

73
import java.sql.Driver;

src/main/java/net/snowflake/client/config/ConnectionParameters.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.config;
52

63
import java.util.Properties;

src/main/java/net/snowflake/client/core/ArrowSqlInput.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.mapSFExceptionToSQLException;

src/main/java/net/snowflake/client/core/AssertUtil.java

-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import net.snowflake.client.jdbc.ErrorCode;
84

9-
/** Created by jhuang on 1/27/16. */
105
public class AssertUtil {
116
/**
127
* Assert the condition is true, otherwise throw an internal error exception with the given

src/main/java/net/snowflake/client/core/BaseSqlInput.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.mapSFExceptionToSQLException;

src/main/java/net/snowflake/client/core/BasicEvent.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.systemGetProperty;
84

9-
/**
10-
* Base Event class for events that don't need to deviate from the default flush behavior.
11-
*
12-
* @author jrosen
13-
*/
5+
/** Base Event class for events that don't need to deviate from the default flush behavior. */
146
public class BasicEvent extends Event {
157
// Format strings for query state transitions
168
private static final String requestId = "requestId: %s";

src/main/java/net/snowflake/client/core/CachedCredentialType.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2024-2025 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
enum CachedCredentialType {

src/main/java/net/snowflake/client/core/CancellationReason.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.core;
52

63
@SnowflakeJdbcInternalApi

src/main/java/net/snowflake/client/core/ChunkDownloader.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import net.snowflake.client.jdbc.SnowflakeResultChunk;

src/main/java/net/snowflake/client/core/ColumnTypeHelper.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2024 Snowflake Computing Inc. All right reserved.
3-
*/
41
package net.snowflake.client.core;
52

63
import java.sql.Types;

src/main/java/net/snowflake/client/core/Constants.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.systemGetProperty;

src/main/java/net/snowflake/client/core/CredentialManager.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import com.amazonaws.util.StringUtils;

src/main/java/net/snowflake/client/core/DataConversionContext.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.core;
52

63
import java.util.TimeZone;

src/main/java/net/snowflake/client/core/DownloaderMetrics.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.core;
52

63
/** Metrics related to chunk downloader performance */

src/main/java/net/snowflake/client/core/Event.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import com.google.common.base.Preconditions;
@@ -14,11 +10,7 @@
1410
import net.snowflake.client.log.SFLogger;
1511
import net.snowflake.client.log.SFLoggerFactory;
1612

17-
/**
18-
* Abstract class to encapsulate a Client-side Event and any methods associated with it.
19-
*
20-
* @author jrosen
21-
*/
13+
/** Abstract class to encapsulate a Client-side Event and any methods associated with it. */
2214
public abstract class Event {
2315
private static final SFLogger logger = SFLoggerFactory.getLogger(Event.class);
2416

src/main/java/net/snowflake/client/core/EventHandler.java

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.systemGetProperty;
@@ -33,9 +29,6 @@
3329
import net.snowflake.client.log.SFLoggerFactory;
3430
import org.joda.time.DateTime;
3531

36-
/**
37-
* @author jrosen
38-
*/
3932
public class EventHandler extends Handler {
4033
private static final SFLogger logger = SFLoggerFactory.getLogger(EventHandler.class);
4134

src/main/java/net/snowflake/client/core/EventUtil.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.jdbc.SnowflakeUtil.systemGetProperty;
84

95
import java.io.File;
106
import java.util.concurrent.atomic.AtomicReference;
117

12-
/**
13-
* Utility class to encapsulate support information pertaining to the EventHandler and events.
14-
*
15-
* @author jrosen
16-
*/
8+
/** Utility class to encapsulate support information pertaining to the EventHandler and events. */
179
public class EventUtil {
1810
public static final String DUMP_PATH_PROP = "snowflake.dump_path";
1911
public static final String DUMP_SIZE_PROP = "snowflake.max_dump_size";

src/main/java/net/snowflake/client/core/ExecTimeTelemetryData.java

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/*
2-
* Copyright (c) 2018-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
41
package net.snowflake.client.core;
52

63
import com.google.common.base.Strings;

src/main/java/net/snowflake/client/core/FileCacheManager.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import static net.snowflake.client.core.FileUtil.isWritable;
@@ -141,14 +137,18 @@ synchronized FileCacheManager build() {
141137
}
142138
if (!cacheDir.exists()) {
143139
try {
144-
Files.createDirectories(
145-
cacheDir.toPath(),
146-
PosixFilePermissions.asFileAttribute(
147-
Stream.of(
148-
PosixFilePermission.OWNER_READ,
149-
PosixFilePermission.OWNER_WRITE,
150-
PosixFilePermission.OWNER_EXECUTE)
151-
.collect(Collectors.toSet())));
140+
if (!isWindows() && onlyOwnerPermissions) {
141+
Files.createDirectories(
142+
cacheDir.toPath(),
143+
PosixFilePermissions.asFileAttribute(
144+
Stream.of(
145+
PosixFilePermission.OWNER_READ,
146+
PosixFilePermission.OWNER_WRITE,
147+
PosixFilePermission.OWNER_EXECUTE)
148+
.collect(Collectors.toSet())));
149+
} else {
150+
Files.createDirectories(cacheDir.toPath());
151+
}
152152
} catch (IOException e) {
153153
logger.info(
154154
"Failed to create the cache directory: {}. Ignored. {}",

src/main/java/net/snowflake/client/core/FileTypeDetector.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import java.io.IOException;
84
import java.nio.file.Path;
95
import org.apache.tika.Tika;
106

11-
/**
12-
* Use Tika to detect the mime type of files
13-
*
14-
* @author jhuang
15-
*/
7+
/** Use Tika to detect the mime type of files */
168
public class FileTypeDetector extends java.nio.file.spi.FileTypeDetector {
179
private final Tika tika = new Tika();
1810

src/main/java/net/snowflake/client/core/HeartbeatBackground.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import java.util.HashSet;

src/main/java/net/snowflake/client/core/HexUtil.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2025 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
class HexUtil {

src/main/java/net/snowflake/client/core/HttpClientSettingsKey.java

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) 2012-2021 Snowflake Computing Inc. All rights reserved.
3-
*/
4-
51
package net.snowflake.client.core;
62

73
import com.google.common.base.Strings;

0 commit comments

Comments
 (0)