Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
e03967c3
Unverified
Commit
e03967c3
authored
Apr 16, 2022
by
aiwenmo
Committed by
GitHub
Apr 16, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[fix-407] [common] [function] Use "==" to judge whether the values of…
[fix-407] [common] [function] Use "==" to judge whether the values of…
parents
684d7fe8
c9cf7f39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
JobLifeCycle.java
dlink-common/src/main/java/com/dlink/model/JobLifeCycle.java
+2
-2
Top2WithRetract.java
...ion/src/main/java/com/dlink/ud/udtaf/Top2WithRetract.java
+3
-3
No files found.
dlink-common/src/main/java/com/dlink/model/JobLifeCycle.java
View file @
e03967c3
...
@@ -34,7 +34,7 @@ public enum JobLifeCycle {
...
@@ -34,7 +34,7 @@ public enum JobLifeCycle {
public
static
JobLifeCycle
get
(
Integer
value
)
{
public
static
JobLifeCycle
get
(
Integer
value
)
{
for
(
JobLifeCycle
item
:
JobLifeCycle
.
values
())
{
for
(
JobLifeCycle
item
:
JobLifeCycle
.
values
())
{
if
(
item
.
getValue
()
==
value
)
{
if
(
item
.
getValue
()
.
equals
(
value
)
)
{
return
item
;
return
item
;
}
}
}
}
...
@@ -42,7 +42,7 @@ public enum JobLifeCycle {
...
@@ -42,7 +42,7 @@ public enum JobLifeCycle {
}
}
public
boolean
equalsValue
(
Integer
step
)
{
public
boolean
equalsValue
(
Integer
step
)
{
if
(
value
==
step
)
{
if
(
value
.
equals
(
step
)
)
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
dlink-function/src/main/java/com/dlink/ud/udtaf/Top2WithRetract.java
View file @
e03967c3
...
@@ -39,13 +39,13 @@ public class Top2WithRetract extends TableAggregateFunction<Tuple2<Integer, Inte
...
@@ -39,13 +39,13 @@ public class Top2WithRetract extends TableAggregateFunction<Tuple2<Integer, Inte
}
}
}
}
public
void
retract
(
Top2WithRetractAccumulator
acc
,
Integer
v
){
public
void
retract
(
Top2WithRetractAccumulator
acc
,
Integer
v
)
{
if
(
v
==
acc
.
first
)
{
if
(
v
.
equals
(
acc
.
first
)
)
{
acc
.
oldFirst
=
acc
.
first
;
acc
.
oldFirst
=
acc
.
first
;
acc
.
oldSecond
=
acc
.
second
;
acc
.
oldSecond
=
acc
.
second
;
acc
.
first
=
acc
.
second
;
acc
.
first
=
acc
.
second
;
acc
.
second
=
Integer
.
MIN_VALUE
;
acc
.
second
=
Integer
.
MIN_VALUE
;
}
else
if
(
v
==
acc
.
second
)
{
}
else
if
(
v
.
equals
(
acc
.
second
)
)
{
acc
.
oldSecond
=
acc
.
second
;
acc
.
oldSecond
=
acc
.
second
;
acc
.
second
=
Integer
.
MIN_VALUE
;
acc
.
second
=
Integer
.
MIN_VALUE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment