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

Analysis over op on array column failing in RC6 #2127

Open
michae1T opened this issue Oct 31, 2024 · 0 comments
Open

Analysis over op on array column failing in RC6 #2127

michae1T opened this issue Oct 31, 2024 · 0 comments
Milestone

Comments

@michae1T
Copy link

michae1T commented Oct 31, 2024

@jatcwang see test suites using analysis targeting queries with array columns now fail on upgrade to 1.0.0-RC6

Array[A] → ARRAY (_yyy)
Array[A] is not coercible to ARRAY (vendor's name:
_yyy) according to the JDBC specification.
Expected schema type was ARRAY.

possibly due to #2091

meta:

  import doobie.postgres.implicits.unliftedStringArrayType

  given metaNonEmptySetYYY: Meta[NonEmptySet[YYY]] =
    new Meta[NonEmptySet[YYY]](
      get = unliftedStringArrayType.get.temap(
        SortedSet.from(_).toNes.fold(Left("Empty set found")) { strings =>
          Try(strings.map(YYY.valueOf)).toEither.left.map(_.getMessage)
        }
      ),
      put = unliftedStringArrayType.put.tcontramap(_.map(_.toString).toSortedSet.toArray),
    )

postgres

CREATE TYPE yyy AS ENUM ( 'a');

... col yyy[] NOT NULL ...
@michae1T michae1T changed the title Array Analysis over op on array column failing in RC6 Oct 31, 2024
@jatcwang jatcwang added this to the 1.0-RC7 milestone Oct 31, 2024
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

No branches or pull requests

2 participants