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

Transpose errors when values contain strings with parenthesis #1085

Closed
afsalthaj opened this issue Feb 25, 2023 · 0 comments
Closed

Transpose errors when values contain strings with parenthesis #1085

afsalthaj opened this issue Feb 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@afsalthaj
Copy link
Collaborator

afsalthaj commented Feb 25, 2023

  val mapp =
    Map(
      "transformations[0].columnDataTypeMapper.col_C" -> "decimal(19, 2)",
      "transformations[0].columnDataTypeMapper.col_B" -> "double",
      "transformations[0].columnDataTypeMapper.col_A" -> "string"
    )


  val self = ConfigProvider.fromIndexedMap(mapp).load(Config.listOf("transformations", Config.table("columnDataTypeMapper", Config.string)))


  println(Unsafe.unsafe(implicit u => default.unsafe.run(self).getOrThrowFiberFailure()))
  

produces the following error

transpose requires all collections have the same size
Exception in thread "zio-fiber-1" java.lang.IllegalArgumentException: transpose requires all collections have the same size
    at scala.collection.IterableOps.$anonfun$transpose$3(Iterable.scala:385)
    at scala.collection.IterableOps.$anonfun$transpose$3$adapted(Iterable.scala:391)
    at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
    at zio.Chunk$Arr.foreach(Chunk.scala:1685)
    at scala.collection.IterableOps.$anonfun$transpose$2(Iterable.scala:391)
    at scala.collection.IterableOps.$anonfun$transpose$2$adapted(Iterable.scala:389)
    at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
```'


Issue seem to not exist when the values don't have `(19, 2)`
@afsalthaj afsalthaj added the bug Something isn't working label Feb 25, 2023
@afsalthaj afsalthaj changed the title Transpose errors when there is a list of Map Transpose errors when values contain strings with paranthesis Feb 25, 2023
@afsalthaj afsalthaj changed the title Transpose errors when values contain strings with paranthesis Transpose errors when values contain strings with parenthesis Feb 25, 2023
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