Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cc11892
Add "final" to method parameters where they were missing.
leerho May 7, 2025
b9a6261
revert to jdk21 for the time being.
leerho May 7, 2025
127b667
Set pom to java 24.
leerho May 9, 2025
b0addfe
The XxHash function was removed from datasketches-memory and moved here.
leerho May 9, 2025
256ee59
Disabled workflows.
leerho May 10, 2025
d90e5a5
Upadate ds-java dependency on ds-memory to local
leerho May 11, 2025
4572611
Fix imports
leerho May 12, 2025
d948ce7
Update .asf.yaml
leerho May 16, 2025
6008cb3
Theta rework, phase 1, no testing yet!
leerho May 23, 2025
543e866
Partial progress on Theta tests.
leerho Jun 10, 2025
a3aa141
partial progress 2
leerho Jun 10, 2025
5db9ccc
Theta Rework: completed all classes and tests.
leerho Jun 16, 2025
e0a9710
Remove use of aligned heap segments. Consider in the future.
leerho Jun 16, 2025
6b2d7ab
Make classes Final where possible
leerho Jun 18, 2025
8fffa8c
All of Tuple2 converted to FFM
leerho Jun 24, 2025
a00f732
Finished all of theta and tuple
leerho Jun 25, 2025
9a556f4
Some needed clean up.
leerho Jun 26, 2025
a3e4165
More cleanup.
leerho Jun 26, 2025
a66d3b0
More cleanup
leerho Jun 27, 2025
7dccb96
preparing for delete of old theta, tuple, thetacommon, fdt and tests.
leerho Jun 27, 2025
5f199a3
More prep before deletions.
leerho Jun 27, 2025
e566965
more cleanup
leerho Jun 28, 2025
357a8a7
Prepare for merge
leerho Jun 28, 2025
fbab0a0
enable github workflows
leerho Jun 28, 2025
90727a8
Disable the GHA workflows.
leerho Jun 28, 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
16 changes: 8 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ github:
edit_comment_discussion: "Re: [D] {title} ({repository})"
delete_comment_discussion: "Re: [D] {title} ({repository})"

notifications:
commits: commits@dataskethces.apache.org
issues: dev@dataskethces.apache.org
discussions: dev@dataskethces.apache.org
pullrequests_status: dev@dataskethces.apache.org
pullrequests_comment: dev@dataskethces.apache.org
# Send dependabot PRs to commits@ instead
pullrequests_bot_dependabot: commits@dataskethces.apache.org
notifications:
commits: commits@dataskethces.apache.org
issues: dev@dataskethces.apache.org
discussions: dev@dataskethces.apache.org
pullrequests_status: dev@dataskethces.apache.org
pullrequests_comment: dev@dataskethces.apache.org
# Send dependabot PRs to commits@ instead
pullrequests_bot_dependabot: commits@dataskethces.apache.org
13 changes: 6 additions & 7 deletions .github/workflows/auto-jdk-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Auto JDK Matrix Test & Install

on:
push:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
pull_request:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# The branches below must be a subset of the branches above
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# push:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those commented config intended ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that related to that statement maybe
We will not be able to run the GHA workflows until we have either a Java24 or Java25 release.

Copy link
Contributor Author

@leerho leerho Jun 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The current state of FFM is a problem wrt LTS releases and Eclipse (and VScode). FFM in Java 21 is still in "Preview", and Eclipse ECJ compiler only supports preview with the latest Java release (24). FFM graduated to full Java integration with Java 22. The next LTS is Java 25, which comes out in September, 2025. Although Java 25ea is available, few tools support ea. So I did this development in Java 24. From examining Java 25ea I know that FFM doesn't change in any ways that would affect my use of FFM. I don't really want to release the library on Java 24 as it would only be good for a few months.

Since there is no Maven Central artifact of this code, the GHA runners cannot access it -- thus I have to disable the GHA workflows until I can actually release it, which will be after September. The commented GHA workflow "on:" configs are only until I can actually do a release, when I can enable the CI again. All of this work, and there will be more upcoming merges, is in preparation for Java 25.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, thank you for your willingness to review this code!!

# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# pull_request:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# # The branches below must be a subset of the branches above
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
workflow_dispatch:

env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/auto-os-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Auto OS Matrix Test & Install

on:
push:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
pull_request:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# The branches below must be a subset of the branches above
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# push:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# pull_request:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# # The branches below must be a subset of the branches above
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
workflow_dispatch:

env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/check_cpp_files.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: CPP SerDe Compatibility Test

on:
push:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
pull_request:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# The branches below must be a subset of the branches above
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# push:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# pull_request:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# # The branches below must be a subset of the branches above
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
workflow_dispatch:

jobs:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: "CodeQL"

on:
push:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
pull_request:
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# The branches below must be a subset of the branches above
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# push:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
# pull_request:
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/LICENSE', '**/NOTICE' ]
# # The branches below must be a subset of the branches above
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: JavaDoc

on:
push:
branches: main
# push:
# branches: main
workflow_dispatch:

jobs:
Expand Down
27 changes: 15 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ under the License.
</developers>

<properties>
<datasketches-memory.version>6.0.0</datasketches-memory.version>
<datasketches-memory.version>6.1.0-SNAPSHOT</datasketches-memory.version>

<!-- Test -->
<testng.version>7.10.2</testng.version>
<testng.version>7.11.0</testng.version>
<!-- these are TestNG groups used for excluding / including groups of tests. See profiles section. -->
<testng.generate-java-files>generate_java_files</testng.generate-java-files>
<testng.check-cpp-files>check_cpp_files</testng.check-cpp-files>
<testng.check-cpp-historical-files>check_cpp_historical_files</testng.check-cpp-historical-files>

<!-- System-wide properties -->
<maven.version>3.6.3</maven.version>
<java.version>21</java.version>
<jvm-ffm-flag>--enable-preview</jvm-ffm-flag>
<java.version>24</java.version>
<jvm-arguments></jvm-arguments>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<argLine>-Xmx4g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8 ${jvm-ffm-flag}</argLine>
<argLine>-Xmx4g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8 ${jvm-arguments}</argLine>
<charset.encoding>UTF-8</charset.encoding>
<project.build.sourceEncoding>${charset.encoding}</project.build.sourceEncoding>
<project.build.resourceEncoding>${charset.encoding}</project.build.resourceEncoding>
Expand All @@ -114,9 +114,9 @@ under the License.
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<maven-remote-resources-plugin.version>3.2.0</maven-remote-resources-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-surefire-failsafe-plugins.version>3.5.2</maven-surefire-failsafe-plugins.version> <!-- for surefire, failsafe and surefire-report -->
<!-- for surefire, failsafe and surefire-report: -->
<maven-surefire-failsafe-plugins.version>3.5.2</maven-surefire-failsafe-plugins.version>
<maven-toolchains-plugin.version>3.2.0</maven-toolchains-plugin.version>
<!-- com.github plugins -->
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
Expand All @@ -126,7 +126,7 @@ under the License.
<coveralls-repo-token></coveralls-repo-token>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<!-- org.jacoco.maven plugins -->
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
<!-- org.mojohaus plugins -->
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
<!-- other -->
Expand Down Expand Up @@ -164,7 +164,7 @@ under the License.
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>${jvm-ffm-flag}</arg>
<arg>${jvm-arguments}</arg>
</compilerArgs>
</configuration>
</plugin>
Expand All @@ -190,7 +190,7 @@ under the License.
<configuration>
<rules>
<requireJavaVersion>
<version>[21,)</version> <!-- java.version -->
<version>[22,)</version> <!-- java.version -->
</requireJavaVersion>
<requireMavenVersion>
<version>[${maven.version},4.0.0)</version>
Expand Down Expand Up @@ -239,7 +239,7 @@ under the License.
<show>public</show>
<doclint>all,-missing</doclint>
<additionalJOptions>
<additionalJOption>${jvm-ffm-flag}</additionalJOption>
<additionalJOption>${jvm-arguments}</additionalJOption>
</additionalJOptions>
</configuration>
<executions>
Expand Down Expand Up @@ -285,7 +285,7 @@ under the License.
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-failsafe-plugins.version}</version>
<configuration>
<argLine>${jvm-ffm-flag}</argLine>
<argLine>${jvm-arguments}</argLine>
<trimStackTrace>false</trimStackTrace>
<useManifestOnlyJar>false</useManifestOnlyJar>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
Expand Down Expand Up @@ -340,6 +340,7 @@ under the License.
<exclude>**/*.sk</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>**/*.code-workspace</exclude>
</excludes>
</configuration>
</plugin>
Expand Down Expand Up @@ -374,6 +375,7 @@ under the License.
</execution>
<execution>
<id>default-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
Expand Down Expand Up @@ -668,5 +670,6 @@ under the License.
</pluginManagement>
</build>
</profile>

</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.datasketches.common;

import java.lang.foreign.MemorySegment;

/**
* Methods for inquiring the status of a backing MemorySegment.
*/
public interface MemorySegmentStatus {

/**
* Returns true if this object's internal data is backed by a MemorySegment,
* which may be on-heap or off-heap.
* @return true if this object's internal data is backed by a MemorySegment.
*/
boolean hasMemorySegment();

/**
* Returns true if this object's internal data is backed by an off-heap (direct or native)) MemorySegment.
* @return true if this object's internal data is backed by an off-heap (direct or native)) MemorySegment.
*/
boolean isDirect();

/**
* Returns true if the backing MemorySegment of this object refers to the same MemorySegment of <i>that</i>.
* They can either have the same off-heap memory location and size, or refer to the same on-heap array object.
*
* <p>If both segment are off-heap, they both must have the same starting address and the same size.</p>
*
* <p>For on-heap segments, both segments must be based on or derived from the same array object and neither segment
* can be read-only.</p>
*
* <p>Returns false if either argument is null;</p>
*
* @param that The given MemorySegment.
* @return true if the backing MemorySegment of this object hierarchy refers to the same MemorySegment of <i>that</i>.
*/
boolean isSameResource(final MemorySegment that);

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.datasketches.thetacommon;
package org.apache.datasketches.common;

/**
* QuickSelect algorithm improved from Sedgewick. Gets the kth order value
Expand Down
Loading