opensearch-project / opensearch-spark

Spark Accelerator framework ; It enables secondary indices to remote data stores.
Apache License 2.0
22 stars 33 forks source link

[BUG] Map types not supported in FlintDataType #908

Open engechas opened 1 week ago

engechas commented 1 week ago

What is the bug? FlintDataType doesn't support MAP types from Glue

24/11/14 18:18:54 ERROR DefaultOptimisticTransaction: Rolling back transient log due to transaction operation failure
java.lang.IllegalStateException: unsupported data type: MAP<STRING, STRING>
    at org.apache.spark.sql.flint.datatype.FlintDataType$.serializeField(FlintDataType.scala:166) ~[opensearch-spark-standalone_2.12-latest.jar:0.7.0-SNAPSHOT]
    at org.apache.spark.sql.flint.datatype.FlintDataType$.$anonfun$serializeJValue$1(FlintDataType.scala:121) ~[opensearch-spark-standalone_2.12-latest.jar:0.7.0-SNAPSHOT]

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Create a glue table with a map type
  2. Attempt to create a materialized view of the table

What is the expected behavior? MAP types should be supported. Maps can be converted to OpenSearch objects

What is your host/environment?

Do you have any screenshots? If applicable, add screenshots to help explain your problem.

Do you have any additional context? Add any other context about the problem.