Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
aee5224
feat: PaimonService perf Test Case optimize
lebron-hj Apr 10, 2026
67789c6
fix: optimize enableAutoCompact & log in PaimonService
lebron-hj Apr 13, 2026
efaf69d
feat: kafka support applyDefault
jarad0628 Apr 13, 2026
d3f64cb
fix: change missing write privileges from error to warning in MongoDB…
ply0011 Apr 14, 2026
5b6482b
fix: optimize retry logic in PaimonService
lebron-hj Apr 14, 2026
442a446
fix: dameng support ddl with note
jarad0628 Apr 15, 2026
e7db73f
Merge remote-tracking branch 'origin/develop' into develop
jarad0628 Apr 15, 2026
f5433fb
fix: kafka test schemaRegistry
jarad0628 Apr 17, 2026
1cc1736
fix: optimize logic in PaimonService:After paimon is configured with …
lebron-hj Apr 17, 2026
fa84f4e
fix: kafka schemaRegistry avro bug
jarad0628 Apr 17, 2026
5524c66
fix: mssql executeCommand timezone bug
jarad0628 Apr 17, 2026
e8e211d
feat: support specific partition write
jarad0628 Apr 18, 2026
2e2868e
feat: kafka support splitUpdatePk
jarad0628 Apr 18, 2026
04979ae
feat: kafka support transaction
jarad0628 Apr 19, 2026
efc3493
fix: gen single test perf project
lebron-hj Apr 21, 2026
ea45513
fix: gen single test perf project
lebron-hj Apr 21, 2026
ed327a7
feat:TAP-11093 Aggregation node optimization
weiliang110100 Apr 21, 2026
bc2c0c4
fix: simpledateformat multi-thread bug
jarad0628 Apr 22, 2026
ae65540
fix: db2 rawServer support HA
jarad0628 Apr 22, 2026
2f4515e
fix: paimon time type use millionSecond
jarad0628 Apr 22, 2026
e302c7a
fix: TAP-11321 Correct the negative value of data type TIME replicate…
mnianqi Apr 22, 2026
2dd90dc
fix: delete postpone bucket support
lebron-hj Apr 23, 2026
57c80e5
Merge pull request #753 from tapdata/develop-paimon-perf
jarad0628 Apr 23, 2026
5469ae9
Merge pull request #754 from tapdata/TAP-11321
jarad0628 Apr 24, 2026
9f03ca5
fix: TAP-11333 No logs were printed on the server when enabled jdbc log
mnianqi Apr 24, 2026
8017439
fix:TAP-11273 In the master-slave merge and flatten scenario, the for…
weiliang110100 Apr 24, 2026
959148e
feat: kafka confluent load schema lazy bug
jarad0628 Apr 24, 2026
b0b6474
Merge remote-tracking branch 'origin/develop' into develop
jarad0628 Apr 24, 2026
5b72f44
Merge pull request #755 from tapdata/feat-TAP-11093
jarad0628 Apr 24, 2026
ef308d4
Merge pull request #757 from tapdata/TAP-11333
jarad0628 Apr 24, 2026
52112a2
Merge pull request #759 from tapdata/fix-TAP-11273-develop
jarad0628 Apr 24, 2026
cf72b06
Merge remote-tracking branch 'origin/develop' into develop
jarad0628 Apr 24, 2026
72b35a3
fix: auto-inject MongoDB HA timeout options when creating MongoClient
ply0011 Apr 25, 2026
9cc9730
Merge pull request #762 from tapdata/main
jarad0628 Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ public static List<String> getColumnTypesFromResultSet(ResultSet resultSet) thro
return columnTypeNames;
}

public static List<Integer> getColumnTypeNumbersFromResultSet(ResultSet resultSet) throws SQLException {
//get all column typeNames
List<Integer> columnTypeNumbers = new ArrayList<>();
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {
columnTypeNumbers.add(resultSetMetaData.getColumnType(i));
}
return columnTypeNumbers;
}

public static List<Object> getDataArrayByColumnName(ResultSet resultSet, String columnName) throws SQLException {
List<Object> list = TapSimplify.list();
while (resultSet.next()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io.tapdata.kit.EmptyKit;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.*;
import java.util.Enumeration;

/**
* @author samuel
Expand Down Expand Up @@ -41,4 +41,27 @@ public static void validateHostPortWithSocket(String host, int port, int timeout
public static void validateHostPortWithSocket(String host, int port) throws IOException, IllegalArgumentException {
validateHostPortWithSocket(host, port, DEFAULT_SOCKET_TIMEOUT_MS);
}

public static String getLocalIP() {
try {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
NetworkInterface ni = interfaces.nextElement();
// 跳过回环接口、未启用或虚拟网卡
if (ni.isLoopback() || !ni.isUp() || ni.isVirtual()) continue;

Enumeration<InetAddress> addresses = ni.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress addr = addresses.nextElement();
// 只取 IPv4 地址,跳过 IPv6
if (addr instanceof Inet4Address && !addr.isLoopbackAddress()) {
return addr.getHostAddress();
}
}
}
return InetAddress.getLocalHost().getHostAddress();
} catch (Exception e) {
return "127.0.0.1";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@ void testRemoveParentheses() {
result = StringKit.removeParentheses("TIMESTAMP(6) WITH TIME ZONE");
assertEquals("TIMESTAMP WITH TIME ZONE", result);
}

@Test
void testRemoveSqlNote() {
String result = StringKit.removeSqlNote("-----注释\n" +
"alter table\n" +
" ----加注释\n" +
" xxx add /*又来注释*/ aaa int;\n");
assertEquals("alter table\n" +
" xxx add aaa int;", result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,33 +322,34 @@ protected static Serializable deserializeTimeV2(int meta, ByteArrayInputStream i
* (3 bytes in total)
*
* + fractional-seconds storage (size depends on meta)
* * The fractional part:
* read 1 byte, if meta is 1 or 2
* read 2 bytes, if meta is 3 or 4
* read 3 bytes, if meta is 5 or 6
*/
long time = bigEndianLong(inputStream.read(3), 0, 3);
boolean is_negative = bitSlice(time, 0, 1, 24) == 0;
int hours = bitSlice(time, 2, 10, 24);
int minutes = bitSlice(time, 12, 6, 24);
int seconds = bitSlice(time, 18, 6, 24);
int nanoSeconds;
if (is_negative) { // mysql binary arithmetic for negative encoded values
hours = ~hours & MASK_10_BITS;
hours = hours & ~(1 << 10); // unset sign bit
minutes = ~minutes & MASK_6_BITS;
minutes = minutes & ~(1 << 6); // unset sign bit
seconds = ~seconds & MASK_6_BITS;
seconds = seconds & ~(1 << 6); // unset sign bit
nanoSeconds = deserializeFractionalSecondsInNanosNegative(meta, inputStream);
if (nanoSeconds == 0 && seconds < 59) { // weird java Duration behavior
++seconds;
}
hours = -hours;
minutes = -minutes;
seconds = -seconds;
nanoSeconds = -nanoSeconds;
}
else {
nanoSeconds = deserializeFractionalSecondsInNanos(meta, inputStream);
}
return Duration.ofHours(hours).plusMinutes(minutes).plusSeconds(seconds).plusNanos(nanoSeconds);
int fractionBytes = (meta + 1) / 2;
int payloadBytes = 3 + fractionBytes;
int payloadBits = payloadBytes * 8;
long time = bigEndianLong(inputStream.read(payloadBytes), 0, payloadBytes);
boolean is_negative = bitSlice(time, 0, 1, payloadBits) == 0;

if (is_negative) {
/*
* Negative numbers are stored in two's complement form.
* To get the positive value of a negative number in two's complement form,
* we should invert the bits of the number and add 1 to the result.
* Then we can take the number from the corresponding bits on the final result.
*/
time = ~time + 1;
}

int hours = bitSlice(time, 2, 10, payloadBits);
int minutes = bitSlice(time, 12, 6, payloadBits);
int seconds = bitSlice(time, 18, 6, payloadBits);
int fraction = bitSlice(time, 24, fractionBytes * 8, payloadBits);
long nanoSeconds = (long) (fraction / (0.0000001 * Math.pow(100, fractionBytes - 1)));
final Duration duration = Duration.ofHours(hours).plusMinutes(minutes).plusSeconds(seconds).plusNanos(nanoSeconds);
return is_negative && !duration.isNegative() ? duration.negated() : duration;
}

/**
Expand Down
20 changes: 20 additions & 0 deletions connectors-common/sql-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>generate-log4jdbc-properties</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo file="${project.build.outputDirectory}/log4jdbc.log4j2.properties">
log4jdbc.spylogdelegator.name = io.tapdata.common.log.CustomLogDelegator</echo>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading