Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: UUID rate semver FPF-14284 #38

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

mercesanchez
Copy link

  • Support new logical types: uuid, rate and semver
  • Fix the random generator of multipolygon geometry.

NOTE: The versión of spark-sdk will be update when new release version with new logical types will be published.

@@ -22,12 +22,12 @@ protected void setBounds(

public double randomLatitude() {
Random r = new Random();
return bottomBound + (upperBound - bottomBound) * r.nextDouble();
return -90 + r.nextInt(180) + r.nextDouble();
Copy link
Member

Choose a reason for hiding this comment

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

¿No funcionaba el mecanismo anterior?

@@ -24,10 +24,12 @@ public void shouldStringifyCorrectly() {
FeatureCollection featureCollection = createFeatureCollection();
assertNotNull(featureCollection.toString());
Gson gson = new Gson();

String fcollection = featureCollection.toString();
Copy link
Member

Choose a reason for hiding this comment

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

No parece necesario sacarlo fuera, ¿no? Si se fuera a usar en otro sitio la variable, ahí sí.

Point point4 = new Point(null, null, crs);
Point point5 = new Point(point4.latitude, null, crs);
Point point6 = new Point(null, point5.longitude, crs);
/* NOTE: The polygon is formed by 5 points due to geojson library */
Copy link
Member

Choose a reason for hiding this comment

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

Es curioso que el .isValid() no permita "triángulos" (4 puntos, el primero coincidiendo con el último).

}
i++;
}
throw new RuntimeException("Could not generate a valid MultiPolygon after 1000 attempts.");
Copy link
Member

Choose a reason for hiding this comment

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

¿Sabemos las iteraciones, en media, que esto suele tardar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants