Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
aa49414
synch with main
renovate-bot Jun 5, 2025
f620b0d
Mutable objects used for immutable values #772: added final to base a…
fabio-rizzo-01 Jun 10, 2025
7a6962f
Mutable objects used for immutable values #772: fixed tests
fabio-rizzo-01 Jun 11, 2025
f4e55a3
Mutable objects used for immutable values #772: fixed tests
renovate-bot Jun 5, 2025
4bcb3d8
Mutable objects used for immutable values #772: synch from main
fabio-rizzo-01 Jun 11, 2025
de311e6
Merge remote-tracking branch 'private/feature/immutability-772' into …
fabio-rizzo-01 Jun 11, 2025
cbc5ce0
parent 3185adf2f30f6eda08eeae1c105db9806f16ca52
renovate-bot Jun 5, 2025
0f2df19
Merge remote-tracking branch 'private/feature/immutability-772' into …
fabio-rizzo-01 Jun 11, 2025
de4ba5b
Merge branch 'main-latest' into feature/immutability-772
fabio-rizzo-01 Jun 11, 2025
50caac6
parent 3185adf2f30f6eda08eeae1c105db9806f16ca52
renovate-bot Jun 5, 2025
92aa3c7
Mutable objects used for immutable values #772: fixed integration tests
fabio-rizzo-01 Jun 20, 2025
8adad24
Merge remote-tracking branch 'private/feature/immutability-772' into …
fabio-rizzo-01 Jun 20, 2025
264fb45
# This is a combination of 52 commits.
jbonofre Jun 7, 2025
f5eec79
Merge remote-tracking branch 'private/feature/immutability-772' into …
fabio-rizzo-01 Jun 20, 2025
467f9fa
Mutable objects used for immutable values #772: synch from main
fabio-rizzo-01 Jun 20, 2025
5b4a09e
Mutable objects used for immutable values #772: synch from main
fabio-rizzo-01 Jun 20, 2025
f9dfb91
synch NOTICE with main
fabio-rizzo-01 Jun 26, 2025
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 @@ -24,8 +24,6 @@
import jakarta.persistence.Table;
import jakarta.persistence.Version;
import org.apache.polaris.core.entity.PolarisBaseEntity;
import org.apache.polaris.core.entity.PolarisEntitySubType;
import org.apache.polaris.core.entity.PolarisEntityType;

/**
* Entity model representing all attributes of a Polaris Entity. This is used to exchange full
Expand Down Expand Up @@ -262,24 +260,23 @@ public static PolarisBaseEntity toEntity(ModelEntity model) {
return null;
}

var entity =
new PolarisBaseEntity(
model.getCatalogId(),
model.getId(),
PolarisEntityType.fromCode(model.getTypeCode()),
PolarisEntitySubType.fromCode(model.getSubTypeCode()),
model.getParentId(),
model.getName());
entity.setEntityVersion(model.getEntityVersion());
entity.setCreateTimestamp(model.getCreateTimestamp());
entity.setDropTimestamp(model.getDropTimestamp());
entity.setPurgeTimestamp(model.getPurgeTimestamp());
entity.setToPurgeTimestamp(model.getToPurgeTimestamp());
entity.setLastUpdateTimestamp(model.getLastUpdateTimestamp());
entity.setProperties(model.getProperties());
entity.setInternalProperties(model.getInternalProperties());
entity.setGrantRecordsVersion(model.getGrantRecordsVersion());
return entity;
return new PolarisBaseEntity.Builder()
.catalogId(model.getCatalogId())
.id(model.getId())
.typeCode(model.getTypeCode())
.subTypeCode(model.getSubTypeCode())
.parentId(model.getParentId())
.name(model.getName())
.entityVersion(model.getEntityVersion())
.createTimestamp(model.getCreateTimestamp())
.dropTimestamp(model.getDropTimestamp())
.purgeTimestamp(model.getPurgeTimestamp())
.toPurgeTimestamp(model.getToPurgeTimestamp())
.lastUpdateTimestamp(model.getLastUpdateTimestamp())
.properties(model.getProperties())
.internalProperties(model.getInternalProperties())
.grantRecordsVersion(model.getGrantRecordsVersion())
.build();
}

public void update(PolarisBaseEntity entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,22 @@ public static PolarisBaseEntity toEntity(ModelEntity model) {
throw new IllegalArgumentException("Invalid entity subtype: " + model.getSubTypeCode());
}

var entity =
new PolarisBaseEntity(
model.getCatalogId(),
model.getId(),
entityType,
subType,
model.getParentId(),
model.getName());
entity.setEntityVersion(model.getEntityVersion());
entity.setCreateTimestamp(model.getCreateTimestamp());
entity.setDropTimestamp(model.getDropTimestamp());
entity.setPurgeTimestamp(model.getPurgeTimestamp());
entity.setToPurgeTimestamp(model.getToPurgeTimestamp());
entity.setLastUpdateTimestamp(model.getLastUpdateTimestamp());
entity.setProperties(model.getProperties());
entity.setInternalProperties(model.getInternalProperties());
entity.setGrantRecordsVersion(model.getGrantRecordsVersion());
return entity;
return new PolarisBaseEntity.Builder()
.catalogId(model.getCatalogId())
.id(model.getId())
.typeCode(model.getTypeCode())
.subTypeCode(model.getSubTypeCode())
.parentId(model.getParentId())
.name(model.getName())
.entityVersion(model.getEntityVersion())
.createTimestamp(model.getCreateTimestamp())
.dropTimestamp(model.getDropTimestamp())
.purgeTimestamp(model.getPurgeTimestamp())
.toPurgeTimestamp(model.getToPurgeTimestamp())
.lastUpdateTimestamp(model.getLastUpdateTimestamp())
.properties(model.getProperties())
.internalProperties(model.getInternalProperties())
.grantRecordsVersion(model.getGrantRecordsVersion())
.build();
}
}
Loading
Loading