Skip to content

Commit

Permalink
release: Update version to 3.2.26, sync from internal
Browse files Browse the repository at this point in the history
  • Loading branch information
idleyui committed Mar 1, 2022
1 parent 117ec87 commit 868a1ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aliyun.odps</groupId>
<artifactId>odps-jdbc</artifactId>
<version>3.2.25</version>
<version>3.2.26</version>
<name>odps-jdbc</name>
<description>Aliyun ODPS JDBC driver</description>
<url>http://odps.aliyun.com</url>
Expand Down Expand Up @@ -49,7 +49,7 @@
</distributionManagement>

<properties>
<sdk.version>0.37.10-public</sdk.version>
<sdk.version>0.38.4-public</sdk.version>
<junit.version>4.11</junit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>1.8</jdk.version>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/aliyun/odps/jdbc/OdpsStatement.java
Expand Up @@ -925,6 +925,7 @@ private void runSQLInSession(String sql, Map<String, String> settings)
settings.put("odps.sql.select.auto.limit", autoSelectLimit.toString());
}
executor.run(sql, settings);
executeInstance = executor.getInstance();
try {
sessionResultSet = executor.getResultSet(0L, resultCountLimit, resultSizeLimit, enableLimit);
List<String> exeLog = executor.getExecutionLog();
Expand All @@ -945,8 +946,6 @@ private void runSQLInSession(String sql, Map<String, String> settings)
long end = System.currentTimeMillis();
connHandle.log.info("It took me " + (end - begin) + " ms to run sql");

executeInstance = executor.getInstance();

String logView = executor.getLogView();
connHandle.log.info("Run SQL: " + sql + ", LogView:" + logView);
warningChain = new SQLWarning(executor.getSummary());
Expand Down
Expand Up @@ -74,20 +74,20 @@ public Object transform(
return null;
}

Builder calendarBuilder = new Calendar.Builder()
.setCalendarType("iso8601")
.setLenient(true);
if (timeZone != null) {
calendarBuilder.setTimeZone(timeZone);
if (o instanceof byte[]) {
return encodeBytes((byte[]) o, charset);
}
Calendar calendar = calendarBuilder.build();


// The argument cal should always be ignored since MaxCompute stores timezone information.
try {
if (o instanceof byte[]) {
return encodeBytes((byte[]) o, charset);
} else if (java.util.Date.class.isInstance(o)) {
if (java.util.Date.class.isInstance(o)) {
Builder calendarBuilder = new Calendar.Builder()
.setCalendarType("iso8601")
.setLenient(true);
if (timeZone != null) {
calendarBuilder.setTimeZone(timeZone);
}
Calendar calendar = calendarBuilder.build();

if (java.sql.Timestamp.class.isInstance(o)) {
// MaxCompute TIMESTAMP
Expand All @@ -104,6 +104,13 @@ public Object transform(
}
} else {
if (odpsType != null) {
Builder calendarBuilder = new Calendar.Builder()
.setCalendarType("iso8601")
.setLenient(true);
if (timeZone != null) {
calendarBuilder.setTimeZone(timeZone);
}
Calendar calendar = calendarBuilder.build();
DATETIME_FORMAT.get().setCalendar(calendar);

switch (odpsType.getOdpsType()) {
Expand Down

0 comments on commit 868a1ab

Please sign in to comment.