Skip to content

Loosen static typing for delta when applied to imported instances #98

@wisnesky

Description

@wisnesky

The mapping equivalent of this fails due to the dynamic schema on J.

typeside T = literal {
imports sql
external_functions
stringToDouble : String -> Double =
"x => { if (x.isEmpty()) { return x } else { return java.util.Optional.of(java.lang.Double.parseDouble(x.get())) } }"
}

instance J = import_csv "/Users/ryan/Downloads/QualInsp" : T

schema D = literal : T {
entities
QualInsp
attributes
inspNo : QualInsp -> String
mGeomAcc : QualInsp -> Double
}

query Q = literal : schemaOf J -> D {
entity
QualInsp -> {from x:QualInsp
attributes
inspNo -> x.inspNo
mGeomAcc -> stringToDouble(x.mGeomAcc)}
}
instance Result = eval Q J

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions