roundtripTest for interval with precision is failing
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 175
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 9
Description
I wanted to increase the coverage for TemporalCodecs by adding a roundtripTest for every valid interval with precision codec.
However, it is failing with the following exception.
π tests.codec.TemporalCodecTest
? interval(0) (gmap) (Asserted and actual column types differ.)
? interval(0) (Asserted and actual column types differ.)
π₯
π₯ ColumnAlignmentException
π₯
π₯ Problem: Asserted and actual column types differ.
π₯ Hint: The decoder you provided is incompatible with the output columns for
π₯ this query. You may need to add or remove columns from the query or
π₯ your decoder, change their types, or add explicit SQL casts.
π₯
π₯ The statement under consideration was defined
π₯ at /home/zsambek/dev/opensource/skunk/modules/tests/src/test/scala/codec/CodecTest.scala:35
π₯
π₯ select $1::interval(0)
π₯
π₯ The actual and asserted output columns are
π₯
π tests.codec.TemporalCodecTest
? interval(0) (gmap) (Asserted and actual column types differ.)
π₯ interval interval -> interval(0) ββ type mismatch
π₯
skunk.exception.ColumnAlignmentException: Asserted and actual column types differ.
π₯
π₯ ColumnAlignmentException
π₯
π₯ Problem: Asserted and actual column types differ.
π₯ Hint: The decoder you provided is incompatible with the output columns for
π₯ this query. You may need to add or remove columns from the query or
π₯ your decoder, change their types, or add explicit SQL casts.
π₯
π₯ The statement under consideration was defined
π₯ at /home/zsambek/dev/opensource/skunk/modules/tests/src/test/scala/codec/CodecTest.scala:35
π₯
π₯ select $1::interval(0)
π₯
π₯ The actual and asserted output columns are
π₯
π₯ interval interval -> interval(0) ββ type mismatch
Test suite aborted
π₯
Test suite aborted
skunk.exception.ColumnAlignmentException: Asserted and actual column types differ.
Execution took -2ms
The test case for this one was: roundtripTest(interval(0))(intervals: _*)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failing TemporalCodecTest case, roundtripTest(interval(0))(intervals: _*), and the statement location in modules/tests/src/test/scala/codec/CodecTest.scala. Run the test and compare the asserted interval(0) column type with the actual interval type. Done means the precision interval roundtrip test passes without a ColumnAlignmentException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres, scala
- Domain
- database, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100