Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<properties>
<ydb-auth-api.version>1.0.0</ydb-auth-api.version>
<ydb-proto-api.version>1.6.4</ydb-proto-api.version>
<ydb-proto-api.version>1.7.0</ydb-proto-api.version>
<yc-auth.version>2.2.0</yc-auth.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void pessimizeEndpoint(EndpointRecord endpoint) {
long bestPriority = records.get(0).priority;
int newBestCount = 0;
int newPessimizedCount = 0;
for (PriorityEndpoint record: records) {
for (PriorityEndpoint record : records) {
if (record.getPriority() == bestPriority) {
newBestCount++;
}
Expand Down
16 changes: 16 additions & 0 deletions table/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,20 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<environmentVariables>
<TESTCONTAINERS_REUSE_ENABLE>true</TESTCONTAINERS_REUSE_ENABLE>
<YDB_DOCKER_IMAGE>ydbplatform/local-ydb:trunk</YDB_DOCKER_IMAGE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ public interface PrimitiveReader {

Duration getInterval();

LocalDate getDate32();

LocalDateTime getDatetime64();

Instant getTimestamp64();

Duration getInterval64();

ZonedDateTime getTzDate();

ZonedDateTime getTzDatetime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ public Duration getInterval() {
throw error("getInterval");
}

@Override
public LocalDate getDate32() {
throw error("getDate32");
}

public LocalDateTime getDatetime64() {
throw error("getDatetime64");
}

@Override
public Instant getTimestamp64() {
throw error("getTimestamp64");
}

public Duration getInterval64() {
throw error("getInterval64");
}

@Override
public ZonedDateTime getTzDate() {
throw error("getTzDate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,30 @@ public Duration getInterval() {
return ProtoValue.toInterval(value);
}

@Override
public LocalDate getDate32() {
checkPrimitive(PrimitiveTypeId.DATE32);
return ProtoValue.toDate32(value);
}

@Override
public LocalDateTime getDatetime64() {
checkPrimitive(PrimitiveTypeId.DATETIME64);
return ProtoValue.toDatetime64(value);
}

@Override
public Instant getTimestamp64() {
checkPrimitive(PrimitiveTypeId.TIMESTAMP64);
return ProtoValue.toTimestamp64(value);
}

@Override
public Duration getInterval64() {
checkPrimitive(PrimitiveTypeId.INTERVAL64);
return ProtoValue.toInterval64(value);
}

@Override
public ZonedDateTime getTzDate() {
checkPrimitive(PrimitiveTypeId.TZ_DATE);
Expand Down
20 changes: 14 additions & 6 deletions table/src/main/java/tech/ydb/table/values/PrimitiveType.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,20 @@ public enum PrimitiveType implements Type {
/** JSON in an indexed binary representation. Doesn't support matching, can't be used in the primary key */
JsonDocument(ProtoType.getJsonDocument()),
/** A binary representation of a real number with an accuracy of up to 38 digits.
* Acceptable values: positive numbers from 1×10-130 up to 1×10126–1,
* negative numbers from -1×10126–1 to -1×10-130, and 0.
* Compatible with the Number type in AWS DynamoDB.
* It's not recommended for ydb-native applications.
*/
DyNumber(ProtoType.getDyNumber());
* Acceptable values: positive numbers from 1×10-130 up to 1×10126–1,
* negative numbers from -1×10126–1 to -1×10-130, and 0.
* Compatible with the Number type in AWS DynamoDB.
* It's not recommended for ydb-native applications.
*/
DyNumber(ProtoType.getDyNumber()),

Date32(ProtoType.getDate32()),

Datetime64(ProtoType.getDatetime64()),

Timestamp64(ProtoType.getTimestamp64()),

Interval64(ProtoType.getInterval64());

private final ValueProtos.Type pbType;

Expand Down
Loading
Loading