Skip to content

Conversation

@jhrotko
Copy link

@jhrotko jhrotko commented Nov 3, 2025

What's Changed

Add Uuid Extension type canonical implementation in Java. The proposed implementation was validated in Dremio engine

Closes #825

@github-actions

This comment has been minimized.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

See previous PR. It is not sufficient to move the existing files, the "uuid" type used in tests was never meant to implement the canonical type. #824

@jhrotko jhrotko changed the title GH-825: Move UuidType to arrow.vector from test GH-825: Implement Uuid canonical type Nov 7, 2025
@jhrotko jhrotko changed the title GH-825: Implement Uuid canonical type GH-825: Add a canonical extension type UUID Nov 7, 2025
@jhrotko jhrotko marked this pull request as ready for review November 7, 2025 13:58
@jhrotko
Copy link
Author

jhrotko commented Nov 7, 2025

@lidavidm could you take another look? Let me know if anything else is missing

@jhrotko jhrotko changed the title GH-825: Add a canonical extension type UUID GH-825: Add UUID canonical extension type Nov 7, 2025
Copy link
Contributor

@bodduv bodduv left a comment

Choose a reason for hiding this comment

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

Thank you for adding the canonical type.

@lidavidm lidavidm added enhancement PRs that add or improve features. and removed breaking-change labels Nov 11, 2025
@github-actions github-actions bot added this to the 18.4.0 milestone Nov 11, 2025
@jhrotko
Copy link
Author

jhrotko commented Nov 11, 2025

there are some integration tests failling:

  ################# FAILURES #################
  FAILED TEST: custom_metadata Java producing,  Go consuming
  <class 'RuntimeError'>: Command failed: /root/go/bin/arrow-json-integration-test -arrow /tmp/tmprky9nvsk/020d3b5c_generated_custom_metadata.json_as_file -json /tmp/arrow-integration-ypsmstn1/generated_custom_metadata.json -mode VALIDATE
  With output:
  --------------
  arrow-json: JSON schema:
  schema:
    fields: 4
      - sort_of_pandas: type=int8, nullable
                  metadata: ["pandas": "{}"]
      - lots_of_meta: type=int8, nullable
                metadata: ["a": "{}", "b": "{}", "c": "{}", "d": "{}", "..": "{}", "w": "{}", "x": "{}", "y": "{}", "z": "{}"]
      - unregistered_extension: type=int8, nullable
                          metadata: ["ARROW:extension:name": "!nonexistent", "ARROW:extension:metadata": "", "ARROW:integration:allow_unregistered_extension": "true"]
      - list_with_odd_values: type=list<item: int32, nullable>, nullable
    metadata: ["schema_custom_0": "{}", "schema_custom_1": "{}"]
  Arrow schema:
  schema:
    fields: 4
      - sort_of_pandas: type=int8, nullable
                  metadata: ["pandas": "{}"]
      - lots_of_meta: type=int8, nullable
                metadata: ["..": "{}", "a": "{}", "b": "{}", "c": "{}", "d": "{}", "w": "{}", "x": "{}", "y": "{}", "z": "{}"]
      - unregistered_extension: type=int8, nullable
                          metadata: ["ARROW:extension:name": "!nonexistent", "ARROW:extension:metadata": "", "ARROW:integration:allow_unregistered_extension": "true"]
      - list_with_odd_values: type=list<item: int32, nullable>, nullable
    metadata: ["schema_custom_1": "{}", "schema_custom_0": "{}"]
  arrow-json: schemas did not match
  
  --------------
  
  
  FAILED TEST: flight_sql Java producing,  Go consuming
  <class 'RuntimeError'>: Command failed: /root/go/bin/arrow-flight-integration-client -host localhost -port=43857 -scenario flight_sql
  With output:
  --------------
  gc 1 @3.115s 0%: 0.078+0.59+0.008 ms clock, 0.31+0.37/0.34/0.60+0.032 ms cpu, 3->3->0 MB, 4 MB goal, 0 MB stacks, 0 MB globals, 4 P
  panic: expected: schema:
  	  fields: 1
  	    - id: type=int64, nullable
  	    metadata: ["ARROW:FLIGHT:SQL:TABLE_NAME": "test", "ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT": "1", "ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE": "0", "ARROW:FLIGHT:SQL:TYPE_NAME": "type_test", "ARROW:FLIGHT:SQL:SCHEMA_NAME": "schema_test", "ARROW:FLIGHT:SQL:IS_SEARCHABLE": "1", "ARROW:FLIGHT:SQL:CATALOG_NAME": "catalog_test", "ARROW:FLIGHT:SQL:PRECISION": "100", "ARROW:FLIGHT:SQL:REMARKS": "test column"], got: schema:
  	  fields: 1
  	    - id: type=int64, nullable
  	    metadata: ["ARROW:FLIGHT:SQL:PRECISION": "100", "ARROW:FLIGHT:SQL:REMARKS": "test column", "ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT": "1", "ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE": "0", "ARROW:FLIGHT:SQL:SCHEMA_NAME": "schema_test", "ARROW:FLIGHT:SQL:TABLE_NAME": "test", "ARROW:FLIGHT:SQL:IS_SEARCHABLE": "1", "ARROW:FLIGHT:SQL:TYPE_NAME": "type_test", "ARROW:FLIGHT:SQL:CATALOG_NAME": "catalog_test"]
  
  goroutine 1 [running]:
  main.main()
  	/arrow/go/arrow/internal/flight_integration/cmd/arrow-flight-integration-client/main.go:52 +0x277
  
  --------------
  
  
  FAILED TEST: flight_sql:extension Java producing,  Go consuming
  <class 'RuntimeError'>: Command failed: /root/go/bin/arrow-flight-integration-client -host localhost -port=35551 -scenario flight_sql:extension
  With output:
  --------------
  panic: expected: schema:
  	  fields: 1
  	    - id: type=int64, nullable
  	    metadata: ["ARROW:FLIGHT:SQL:TABLE_NAME": "test", "ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT": "1", "ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE": "0", "ARROW:FLIGHT:SQL:TYPE_NAME": "type_test", "ARROW:FLIGHT:SQL:SCHEMA_NAME": "schema_test", "ARROW:FLIGHT:SQL:IS_SEARCHABLE": "1", "ARROW:FLIGHT:SQL:CATALOG_NAME": "catalog_test", "ARROW:FLIGHT:SQL:PRECISION": "100", "ARROW:FLIGHT:SQL:REMARKS": "test column"], got: schema:
  	  fields: 1
  	    - id: type=int64, nullable
  	    metadata: ["ARROW:FLIGHT:SQL:PRECISION": "100", "ARROW:FLIGHT:SQL:REMARKS": "test column", "ARROW:FLIGHT:SQL:IS_AUTO_INCREMENT": "1", "ARROW:FLIGHT:SQL:IS_CASE_SENSITIVE": "0", "ARROW:FLIGHT:SQL:SCHEMA_NAME": "schema_test", "ARROW:FLIGHT:SQL:TABLE_NAME": "test", "ARROW:FLIGHT:SQL:IS_SEARCHABLE": "1", "ARROW:FLIGHT:SQL:TYPE_NAME": "type_test", "ARROW:FLIGHT:SQL:CATALOG_NAME": "catalog_test"]
  
  goroutine 1 [running]:
  main.main()
  	/arrow/go/arrow/internal/flight_integration/cmd/arrow-flight-integration-client/main.go:52 +0x277
  
  --------------
  
  
  FAILED TEST: flight_sql Go producing,  Java consuming
  <class 'RuntimeError'>: Command failed: java -Dio.netty.tryReflectionSetAccessible=true -Darrow.struct.conflict.policy=CONFLICT_APPEND --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED -XX:-UsePerfData --add-reads=org.apache.arrow.flight.core=ALL-UNNAMED -cp /build/java/flight/flight-integration-tests/target/flight-integration-tests-19.0.0-SNAPSHOT-jar-with-dependencies.jar org.apache.arrow.flight.integration.tests.IntegrationTestClient -port 40707 -scenario flight_sql
  With output:
  --------------
  WARNING: Unknown module: org.apache.arrow.flight.core specified to --add-reads
  WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens
  SLF4J(W): No SLF4J providers were found.
  SLF4J(W): Defaulting to no-operation (NOP) logger implementation
  SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
  Unknown error
  expected: '%!s(bool=true)', got: '%!s(bool=false)'
  
  --------------
  
  
  FAILED TEST: flight_sql:extension Go producing,  Java consuming
  <class 'RuntimeError'>: Command failed: java -Dio.netty.tryReflectionSetAccessible=true -Darrow.struct.conflict.policy=CONFLICT_APPEND --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED -XX:-UsePerfData --add-reads=org.apache.arrow.flight.core=ALL-UNNAMED -cp /build/java/flight/flight-integration-tests/target/flight-integration-tests-19.0.0-SNAPSHOT-jar-with-dependencies.jar org.apache.arrow.flight.integration.tests.IntegrationTestClient -port 32823 -scenario flight_sql:extension
  With output:
  --------------
  WARNING: Unknown module: org.apache.arrow.flight.core specified to --add-reads
  WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens
  SLF4J(W): No SLF4J providers were found.
  SLF4J(W): Defaulting to no-operation (NOP) logger implementation
  SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
  Unknown error
  expected: '%!s(bool=true)', got: '%!s(bool=false)'
  
  --------------
  
  
  FAILED TEST: custom_metadata Java producing,  Go consuming
  <class 'RuntimeError'>: Go C Data Integration call failed: Schemas are different:
  - Json Schema: schema:
    fields: 4
      - sort_of_pandas: type=int8, nullable
                  metadata: ["pandas": "{}"]
      - lots_of_meta: type=int8, nullable
                metadata: ["a": "{}", "b": "{}", "c": "{}", "d": "{}", "..": "{}", "w": "{}", "x": "{}", "y": "{}", "z": "{}"]
      - unregistered_extension: type=int8, nullable
                          metadata: ["ARROW:extension:name": "!nonexistent", "ARROW:extension:metadata": "", "ARROW:integration:allow_unregistered_extension": "true"]
      - list_with_odd_values: type=list<item: int32, nullable>, nullable
    metadata: ["schema_custom_0": "{}", "schema_custom_1": "{}"]
  - Imported Schema: schema:
    fields: 4
      - sort_of_pandas: type=int8, nullable
                  metadata: ["pandas": "{}"]
      - lots_of_meta: type=int8, nullable
                metadata: ["..": "{}", "a": "{}", "b": "{}", "c": "{}", "d": "{}", "w": "{}", "x": "{}", "y": "{}", "z": "{}"]
      - unregistered_extension: type=int8, nullable
                          metadata: ["ARROW:extension:name": "!nonexistent", "ARROW:extension:metadata": "", "ARROW:integration:allow_unregistered_extension": "true"]
      - list_with_odd_values: type=list<item: int32, nullable>, nullable
    metadata: ["schema_custom_1": "{}", "schema_custom_0": "{}"]
  

It seems the metadata elements when it's a map the order is not maintained. I this a known issue? @lidavidm

@lidavidm
Copy link
Member

It's apache/arrow-go#571

@jhrotko
Copy link
Author

jhrotko commented Nov 11, 2025

@lidavidm it was merged, should this be re-run?

@jhrotko
Copy link
Author

jhrotko commented Nov 12, 2025

@lidavidm anything else missing?

Copy link
Contributor

@bodduv bodduv left a comment

Choose a reason for hiding this comment

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

Thank you for addressing the comments.

@jhrotko jhrotko requested a review from lidavidm November 14, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce type support for UUID as a canonical extension type

3 participants