You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 4.6.0 Module: quill-jdbc-zio Database: postgres Scala version: 3.3.0, also present in Scala 2
Incorrectly generated query for Flat Joins with outer filter
objectQuillContextextendsPostgresZioJdbcContext(NamingStrategy(SnakeCase, PostgresEscape))
importQuillContext._caseclassFile(fileKey: Long, fileCategoryKey: Int)
caseclassFileCategory(fileCategoryKey: Int)
run {
(for {
f <- query[File]
fc <- query[FileCategory].join(fc => fc.fileCategoryKey == f.fileCategoryKey)
} yield (f.fileKey, fc.fileCategoryKey))
.filter(_._1 ==1) // FIXME - this is causing the problem
}
Expected sql result
SELECT f."file_key"AS _1, fc."file_category_key"AS _2
FROM"file" f
INNER JOIN"file_category" fc ON fc."file_category_key"= f."file_category_key"WHERE fc."file_category_key"= f."file_category_key"AND f."file_key"=1;
Actual sql result
See WHERE fc."_1" = 1; should be fc."file_category_key" ...
SELECT f."file_key"AS _1, fc."file_category_key"AS _2
FROM"file" f
INNER JOIN"file_category" fc ON fc."file_category_key"= f."file_category_key"WHERE fc."_1"=1;
Version:
4.6.0
Module:
quill-jdbc-zio
Database:
postgres
Scala version:
3.3.0
, also present in Scala 2Incorrectly generated query for Flat Joins with outer filter
Expected sql result
Actual sql result
See
WHERE fc."_1" = 1;
should befc."file_category_key" ...
Steps to reproduce the behavior
https://scastie.scala-lang.org/FdasL5taSv63PcXy6um9EA
Workaround - correctly working for other join variations:
@getquill/maintainers
The text was updated successfully, but these errors were encountered: