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

Fix the issue with creating parquet with just FLOAT physical type #11

Open
Selfeer opened this issue Dec 18, 2024 · 0 comments
Open

Fix the issue with creating parquet with just FLOAT physical type #11

Selfeer opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Selfeer
Copy link
Collaborator

Selfeer commented Dec 18, 2024

When trying to create a file with just FLOAT as a physical type we get the error.

Structure:

{
  "fileName": "float_examples.parquet",
  "options": {
    "writerVersion": "1.0",
    "compression": "GZIP",
    "rowGroupSize": 256,
    "pageSize": 1024
  },
  "schema": [
    {
      "name": "float1",
      "schemaType": "required",
      "physicalType": "FLOAT",
      "data": [1.2]
    }
  ]
}
Exception in thread "main" java.lang.IllegalArgumentException: Error adding value to group. Value type mismatch for column: float1
	at GenerateParquet.appendValueToGroup(GenerateParquet.java:582)
	at GenerateParquet.insertDataIntoGroup(GenerateParquet.java:478)
	at GenerateParquet.writeData(GenerateParquet.java:407)
	at GenerateParquet.generateParquet(GenerateParquet.java:94)
	at GenerateParquet.main(GenerateParquet.java:43)
Caused by: java.lang.ClassCastException: message MySchema {
  required float float1;
}
 is not primitive
	at org.apache.parquet.schema.Type.asPrimitiveType(Type.java:258)
	at org.apache.parquet.example.data.simple.SimpleGroup.add(SimpleGroup.java:233)
	at org.apache.parquet.example.data.Group.add(Group.java:59)
	at GenerateParquet.appendValueToGroup(GenerateParquet.java:553)
	... 4 more
@Selfeer Selfeer added the bug Something isn't working label Dec 18, 2024
@Selfeer Selfeer self-assigned this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant