Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Attribute Type Rules for Interval Join, Scatter Plot, Sort Partitions, Type Casting #2005

Merged
merged 43 commits into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7648873
Add type checking for Sentiment, Aggregation, Hash Join
aahei May 23, 2023
7733c59
Resolve some PR comments
aahei May 31, 2023
78a4474
Format fix
aahei May 31, 2023
a524e54
fix: initialized validators object in case undefined
aahei Jun 1, 2023
a2ab878
Merge branch 'master' into cli-attr-type-checking
Yicong-Huang Jun 3, 2023
f0acec5
some cleanup and added todos
Yicong-Huang Jun 3, 2023
b1b5809
Hardcode port and refactor code
aahei Jun 4, 2023
187583b
Friendly Error message
aahei Jun 4, 2023
715d89b
modify error message
aahei Jun 4, 2023
b5711f0
experimentally change alert box to blue
aahei Jun 4, 2023
91ce51c
more accurate css selector
aahei Jun 5, 2023
beb78d8
error message and color change
aahei Jun 5, 2023
faafa7f
Change name to attributeTypeRules
aahei Jun 5, 2023
d3664e1
Merge branch 'master' into cli-attr-type-checking
aahei Jun 5, 2023
f42acf3
format
aahei Jun 5, 2023
7cabba4
Merge branch 'master' into cli-attr-type-checking
aahei Jun 5, 2023
5ed9f9c
use autofillAttributeTypeOnPort for port
aahei Jun 8, 2023
b716840
Merge branch 'cli-attr-type-checking' of https://github.com/Texera/te…
aahei Jun 8, 2023
9688a05
Merge branch 'master' into cli-attr-type-checking
Yicong-Huang Jun 12, 2023
7a2be24
Created Attribute Type Rules for
aahei Jun 12, 2023
b388695
Merge branch 'master' into cli-attr-type-checking
Yicong-Huang Jun 12, 2023
7185265
fix format
Yicong-Huang Jun 12, 2023
9b292d0
Merge branch 'cli-attr-type-checking' into cli-attr-type-checking-2
aahei Jun 14, 2023
7109726
Merge branch 'master' into cli-attr-type-checking
Yicong-Huang Jun 14, 2023
37376f2
refactor
Yicong-Huang Jun 14, 2023
22808db
fix format
Yicong-Huang Jun 14, 2023
5ea2e08
simplify
Yicong-Huang Jun 14, 2023
35cc4c1
fix change after detection error
Yicong-Huang Jun 15, 2023
430cb37
fix format
Yicong-Huang Jun 15, 2023
9c03be8
Disabled a unit test in operator-property-edit-frame
aahei Jun 16, 2023
4c39987
Merge branch 'cli-attr-type-checking' into cli-attr-type-checking-2
aahei Jun 16, 2023
c939921
Always show form validation error
aahei Jun 16, 2023
d9b72ac
Fix attribute type rule syntax error
aahei Jun 16, 2023
6a9ddaf
Adjust IntervalJoin type rules
aahei Jun 16, 2023
b35624b
skip type validation when data attribute not selected
aahei Jun 16, 2023
f9aef47
Move type check back into jsonSchemaMapIntercept.
aahei Jun 16, 2023
a0c7d61
Fix ScatterPlot attributeTypeRules
aahei Jun 16, 2023
8e16212
fix SortPartitions attributeTypeRules
aahei Jun 16, 2023
8e28074
format
aahei Jun 16, 2023
2aae14e
fix format
aahei Jun 16, 2023
59cac89
Fix Aggregation Attribute Type Rule, Add Timestamp Type (#2011)
aahei Jun 19, 2023
2e130fa
Merge branch 'master' into cli-attr-type-checking-2
aahei Jun 19, 2023
322728a
Merge branch 'master' into cli-attr-type-checking-2
aahei Jun 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.sql.Timestamp
}
},
"then": {
"enum": ["integer", "long", "double"]
"enum": ["integer", "long", "double", "timestamp"]
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package edu.uci.ics.texera.workflow.operators.intervalJoin
import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.google.common.base.Preconditions
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaTitle
import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
import edu.uci.ics.amber.engine.architecture.deploysemantics.layer.OpExecConfig
import edu.uci.ics.texera.workflow.common.metadata.annotations.{
AutofillAttributeName,
Expand All @@ -23,6 +23,20 @@ import edu.uci.ics.texera.workflow.common.workflow.HashPartition
* 1. The tuples in both inputs come in ascending order
* 2. The left input join key takes as points, join condition is: left key in the range of (right key, right key + constant)
*/
@JsonSchemaInject(json = """
{
"attributeTypeRules": {
"leftAttributeName": {
"enum": ["integer", "long", "double", "timestamp"]
},
"rightAttributeName": {
"const": {
"$data": "leftAttributeName"
}
}
}
}
""")
class IntervalJoinOpDesc extends OperatorDescriptor {

@JsonProperty(required = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package edu.uci.ics.texera.workflow.operators.sortPartitions

import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
import com.google.common.base.Preconditions
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaTitle
import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
import edu.uci.ics.amber.engine.architecture.deploysemantics.layer.OpExecConfig
import edu.uci.ics.texera.workflow.common.metadata.annotations.AutofillAttributeName
import edu.uci.ics.texera.workflow.common.metadata.{
Expand All @@ -15,6 +15,15 @@ import edu.uci.ics.texera.workflow.common.operators.OperatorDescriptor
import edu.uci.ics.texera.workflow.common.tuple.schema.{OperatorSchemaInfo, Schema}
import edu.uci.ics.texera.workflow.common.workflow.RangePartition

@JsonSchemaInject(json = """
{
"attributeTypeRules": {
"sortAttributeName":{
"enum": ["integer", "long", "double"]
}
}
}
""")
class SortPartitionsOpDesc extends OperatorDescriptor {

@JsonProperty(required = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,72 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaInject;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaTitle;
import edu.uci.ics.texera.workflow.common.metadata.annotations.AutofillAttributeName;
import edu.uci.ics.texera.workflow.common.tuple.schema.AttributeType;

@JsonSchemaInject(json =
"{" +
" \"attributeTypeRules\": {" +
" \"attribute\": {" +
" \"allOf\": [" +
" {" +
" \"if\": {" +
" \"resultType\": {" +
" \"valEnum\": [\"integer\"]" +
" }" +
" }," +
" \"then\": {" +
" \"enum\": [\"string\", \"long\", \"double\", \"boolean\"]" +
" }" +
" }," +
" {" +
" \"if\": {" +
" \"resultType\": {" +
" \"valEnum\": [\"double\"]" +
" }" +
" }," +
" \"then\": {" +
" \"enum\": [\"string\", \"integer\", \"long\", \"boolean\"]" +
" }" +
" }," +
" {" +
" \"if\": {" +
" \"resultType\": {" +
" \"valEnum\": [\"boolean\"]" +
" }" +
" }," +
" \"then\": {" +
" \"enum\": [\"string\", \"integer\", \"long\", \"double\"]" +
" }" +
" }," +
" {" +
" \"if\": {" +
" \"resultType\": {" +
" \"valEnum\": [\"long\"]" +
" }" +
" }," +
" \"then\": {" +
" \"enum\": [\"string\", \"integer\", \"double\", \"boolean\", \"timestamp\"]" +
" }" +
" }," +
" {" +
" \"if\": {" +
" \"resultType\": {" +
" \"valEnum\": [\"timestamp\"]" +
" }" +
" }," +
" \"then\": {" +
" \"enum\": [\"string\", \"long\"]" +
" }" +
" }" +
" " +
" ]" +
" }" +
" }" +
"}"
)
public class TypeCastingUnit {
@JsonProperty(required = true)
@JsonSchemaTitle("Attribute")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaInject;
import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaTitle;
import edu.uci.ics.amber.engine.architecture.deploysemantics.layer.OpExecConfig;
import edu.uci.ics.amber.engine.architecture.deploysemantics.layer.OpExecFunc;
Expand Down Expand Up @@ -34,6 +35,17 @@
* This is the description of the operator
*/

@JsonSchemaInject(json =
"{" +
" \"attributeTypeRules\": {" +
" \"xColumn\":{" +
" \"enum\": [\"integer\", \"double\"]" +
" }," +
" \"yColumn\":{" +
" \"enum\": [\"integer\", \"double\"]" +
" }" +
" }" +
"}")
public class ScatterplotOpDesc extends VisualizationOperator {
@JsonProperty(required = true)
@JsonSchemaTitle("X-Column")
Expand Down