Skip to content

Bugfix/2026 05 issues 717#737

Merged
takapi327 merged 7 commits into
masterfrom
bugfix/2026-05-Issues-717
May 21, 2026
Merged

Bugfix/2026 05 issues 717#737
takapi327 merged 7 commits into
masterfrom
bugfix/2026-05-Issues-717

Conversation

@takapi327
Copy link
Copy Markdown
Owner

@takapi327 takapi327 commented May 20, 2026

Implementation Details

Root Cause

DataTypeParser.doubleType constructed DataType.FLOAT for both DOUBLE and REAL keywords, and DataType.DOUBLE did not exist. This caused 64-bit database columns to silently map to Scala's 32-bit Float type.

Changes

  • DataType.scala: Added DataType.DOUBLE case class with sqlType = Types.DOUBLE and scalaType = ScalaType.Double
  • DataTypeParser.scala: Updated doubleType parser to return DataType.DOUBLE instead of DataType.FLOAT
  • DataTypeCodeBuilder.scala: Added a DataType.DOUBLE match arm to generate the correct code string

Test

Added a regression test to DataTypeParserTest.scala that asserts parsing DOUBLE and REAL produces DataType.DOUBLE instances, not DataType.FLOAT.

Fixes

Fixes #717

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 takapi327 self-assigned this May 20, 2026
@takapi327 takapi327 added 🪲 bug Something isn't working project:codegen Addition and modification of functionality to CodeGen projects labels May 20, 2026
@takapi327 takapi327 merged commit 70e7cf8 into master May 21, 2026
37 checks passed
@takapi327 takapi327 deleted the bugfix/2026-05-Issues-717 branch May 21, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪲 bug Something isn't working project:codegen Addition and modification of functionality to CodeGen projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DataTypeParser.doubleType produces DataType.FLOAT (and DataType.DOUBLE doesn't exist in the model)

1 participant