packages feed

project-m36 0.9.6 → 0.9.7

raw patch · 5 files changed

+25/−7 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- ProjectM36.Atomable: instance ProjectM36.Atomable.Atomable Data.ByteString.Internal.ByteString
- ProjectM36.Atomable: instance ProjectM36.Atomable.Atomable GHC.Integer.Type.Integer
+ ProjectM36.Atomable: instance ProjectM36.Atomable.Atomable Data.ByteString.Internal.Type.ByteString
+ ProjectM36.Atomable: instance ProjectM36.Atomable.Atomable GHC.Num.Integer.Integer
- ProjectM36.Base: DifferenceF :: r_aAZt -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: DifferenceF :: r_aEqB -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: EqualsF :: r_aAZt -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: EqualsF :: r_aEqB -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: ExistingRelationF :: Relation -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: ExistingRelationF :: Relation -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: ExtendF :: ExtendTupleExprBase a_aqQ4 -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: ExtendF :: ExtendTupleExprBase a_assp -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: GroupF :: AttributeNamesBase a_aqQ4 -> Text -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: GroupF :: AttributeNamesBase a_assp -> Text -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: JoinF :: r_aAZt -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: JoinF :: r_aEqB -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: MakeRelationFromExprsF :: Maybe [AttributeExprBase a_aqQ4] -> TupleExprsBase a_aqQ4 -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: MakeRelationFromExprsF :: Maybe [AttributeExprBase a_assp] -> TupleExprsBase a_assp -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: MakeStaticRelationF :: Attributes -> RelationTupleSet -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: MakeStaticRelationF :: Attributes -> RelationTupleSet -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: NotEqualsF :: r_aAZt -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: NotEqualsF :: r_aEqB -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: ProjectF :: AttributeNamesBase a_aqQ4 -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: ProjectF :: AttributeNamesBase a_assp -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: RelationVariableF :: Text -> a_aqQ4 -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: RelationVariableF :: Text -> a_assp -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: RenameF :: Text -> Text -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: RenameF :: Text -> Text -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: RestrictF :: RestrictionPredicateExprBase a_aqQ4 -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: RestrictF :: RestrictionPredicateExprBase a_assp -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: UngroupF :: Text -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: UngroupF :: Text -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: UnionF :: r_aAZt -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: UnionF :: r_aEqB -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: WithF :: [(WithNameExprBase a_aqQ4, r_aAZt)] -> r_aAZt -> RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: WithF :: [(WithNameExprBase a_assp, r_aEqB)] -> r_aEqB -> RelationalExprBaseF (a_assp :: Type) r_aEqB
- ProjectM36.Base: data RelationalExprBaseF (a_aqQ4 :: Type) r_aAZt
+ ProjectM36.Base: data RelationalExprBaseF (a_assp :: Type) r_aEqB

Files

Changelog.markdown view
@@ -1,3 +1,7 @@+# 2023-07-18 (v0.9.7)++* fix critical bug resulting in empty results from cross joins+	 # 2022-11-05 (v0.9.6)  * fix tuple context passed down to extended expressions
project-m36.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: project-m36-Version: 0.9.6+Version: 0.9.7 License: MIT --note that this license specification is erroneous and only labeled MIT to appease hackage which does not recognize public domain packages in cabal >2.2- Project:M36 is dedicated to the public domain Build-Type: Simple@@ -213,7 +213,6 @@                    TutorialD.Interpreter.Types,                    TutorialD.Interpreter.SchemaOperator,                    TutorialD.Interpreter.TransGraphRelationalOperator,-                   TutorialD.Interpreter.SchemaOperator,                    TutorialD.Printer     main-is: TutorialD/tutd.hs     CC-Options: -fPIC@@ -384,7 +383,7 @@     import: commontest     type: exitcode-stdio-1.0     main-is: benchmark/OnDiskClient.hs-    GHC-Options: -rtsopts -Wall -threaded -eventlog -O2 -finfo-table-map -fdistinct-constructor-tables+    GHC-Options: -rtsopts -Wall -threaded -eventlog -finfo-table-map -fdistinct-constructor-tables  Test-Suite test-server     import: commontest
src/lib/ProjectM36/Persist.hs view
@@ -43,8 +43,6 @@ #if defined(mingw32_HOST_OS) import ProjectM36.Win32Handle #else--- maybe this could be "safe" for GC since we only use it with withCString--- https://www.reddit.com/r/haskell/comments/xlm4qv/haskell_ffi_call_safety_and_garbage_collection/ foreign import ccall unsafe "cDirectoryFsync" cHSDirectoryFsync :: CString -> IO CInt #endif 
src/lib/ProjectM36/Tuple.hs view
@@ -113,7 +113,7 @@ -- if there are shared attributes, if they match, create a new tuple from the atoms of both tuples based on the attribute ordering argument singleTupleJoin :: Attributes -> RelationTuple -> RelationTuple -> Either RelationalError (Maybe RelationTuple) singleTupleJoin joinedAttrs tup1@(RelationTuple tupAttrs1 _) tup2@(RelationTuple tupAttrs2 _) = if-  V.null keysIntersection || atomsForAttributeNames keysIntersection tup1 /= atomsForAttributeNames keysIntersection tup2+  atomsForAttributeNames keysIntersection tup1 /= atomsForAttributeNames keysIntersection tup2   then     return Nothing   else
test/TutorialD/InterpreterTest.hs view
@@ -92,7 +92,8 @@       testExtendProcessorTuplePushdown,       testDDLHash,       testShowDDL,-      testRegisteredQueries+      testRegisteredQueries,+      testCrossJoin       ]  simpleRelTests :: Test@@ -846,4 +847,20 @@   Right () <- executeDatabaseContextExpr sessionId dbconn (RemoveRegisteredQuery "protect_x")   Right () <- executeDatabaseContextExpr sessionId dbconn (Undefine "x")     pure ()+  +testCrossJoin :: Test+testCrossJoin = TestCase $ do+  (session, dbconn) <- dateExamplesConnection emptyNotificationCallback+  -- Athens, London, Paris cross joined with 17, 12, 14, 19+  executeTutorialD session dbconn "x:=(s{city}) join (s{status})"+  eActual <- executeRelationalExpr session dbconn (RelationVariable "x" ())+  let eExpected = mkRelationFromList (attributesFromList [Attribute "city" TextAtomType, Attribute "status" IntegerAtomType]) [[city,status] | city <- map TextAtom ["Athens", "London", "Paris"], status <- map IntegerAtom [30,20,10]]+  assertBool "cross join error" (isRight eActual)+  assertEqual "cross join" eExpected eActual++  executeTutorialD session dbconn "y:=relation{tuple{a 1},tuple{a 2},tuple{a 3}} join relation{tuple{b 4}, tuple{b 5}, tuple{b 6}}"+  let eExpected' = mkRelationFromList (attributesFromList [Attribute "a" IntegerAtomType, Attribute "b" IntegerAtomType]) [[a,b] | a <- map IntegerAtom [1,2,3], b <- map IntegerAtom [4,5,6]]+  eActual' <- executeRelationalExpr session dbconn (RelationVariable "y" ())+  assertBool "cross join 2 error" (isRight eActual')  +  assertEqual "cross join 2" eExpected' eActual'