Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
a3a27b22
Unverified
Commit
a3a27b22
authored
Apr 03, 2022
by
xiaoguaiguai
Committed by
GitHub
Apr 03, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DataLinkDC:dev' into dev
parents
366de3ab
713392e5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
CABuilder.java
...-core/src/main/java/com/dlink/explainer/ca/CABuilder.java
+1
-1
ColumnCAGenerator.java
...c/main/java/com/dlink/explainer/ca/ColumnCAGenerator.java
+3
-3
LineageColumnGenerator.java
...a/com/dlink/explainer/lineage/LineageColumnGenerator.java
+5
-5
No files found.
dlink-core/src/main/java/com/dlink/explainer/ca/CABuilder.java
View file @
a3a27b22
...
@@ -82,7 +82,7 @@ public class CABuilder {
...
@@ -82,7 +82,7 @@ public class CABuilder {
Set
<
NodeRel
>
columnCASRel
=
result
.
getColumnCASRel
();
Set
<
NodeRel
>
columnCASRel
=
result
.
getColumnCASRel
();
boolean
hasChildren
=
false
;
boolean
hasChildren
=
false
;
for
(
NodeRel
nodeRel
:
columnCASRel
)
{
for
(
NodeRel
nodeRel
:
columnCASRel
)
{
if
(
columnId
==
nodeRel
.
getSufId
(
))
{
if
(
columnId
.
equals
(
nodeRel
.
getSufId
()
))
{
ColumnCA
childca
=
(
ColumnCA
)
result
.
getColumnCASMaps
().
get
(
nodeRel
.
getPreId
());
ColumnCA
childca
=
(
ColumnCA
)
result
.
getColumnCASMaps
().
get
(
nodeRel
.
getPreId
());
// operation = operation.replaceAll(childca.getAlias().replaceAll("\\$","\\\\$"),childca.getOperation());
// operation = operation.replaceAll(childca.getAlias().replaceAll("\\$","\\\\$"),childca.getOperation());
operation
=
operation
.
replaceAll
(
childca
.
getAlias
()
operation
=
operation
.
replaceAll
(
childca
.
getAlias
()
...
...
dlink-core/src/main/java/com/dlink/explainer/ca/ColumnCAGenerator.java
View file @
a3a27b22
...
@@ -61,7 +61,7 @@ public class ColumnCAGenerator implements CAGenerator {
...
@@ -61,7 +61,7 @@ public class ColumnCAGenerator implements CAGenerator {
}
}
for
(
int
j
=
0
;
j
<
this
.
columnCAS
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
this
.
columnCAS
.
size
();
j
++)
{
ColumnCA
columnCA
=
(
ColumnCA
)
this
.
columnCAS
.
get
(
j
);
ColumnCA
columnCA
=
(
ColumnCA
)
this
.
columnCAS
.
get
(
j
);
if
(
columnCA
.
getTableCA
().
getId
()
==
tableCA
.
getId
(
))
{
if
(
columnCA
.
getTableCA
().
getId
()
.
equals
(
tableCA
.
getId
()
))
{
buildColumnCAFields
(
tableCA
,
tableCA
.
getParentId
(),
columnCA
);
buildColumnCAFields
(
tableCA
,
tableCA
.
getParentId
(),
columnCA
);
}
}
}
}
...
@@ -118,7 +118,7 @@ public class ColumnCAGenerator implements CAGenerator {
...
@@ -118,7 +118,7 @@ public class ColumnCAGenerator implements CAGenerator {
for
(
int
i
=
0
;
i
<
this
.
sourceTableCAS
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
this
.
sourceTableCAS
.
size
();
i
++)
{
if
(
this
.
sourceTableCAS
.
get
(
i
)
instanceof
TableCA
)
{
if
(
this
.
sourceTableCAS
.
get
(
i
)
instanceof
TableCA
)
{
TableCA
sourceTableCA
=
(
TableCA
)
this
.
sourceTableCAS
.
get
(
i
);
TableCA
sourceTableCA
=
(
TableCA
)
this
.
sourceTableCAS
.
get
(
i
);
if
(
sourceTableCA
.
getId
()
==
tableCA
.
getId
(
))
{
if
(
sourceTableCA
.
getId
()
.
equals
(
tableCA
.
getId
()
))
{
tableCA
.
setFields
(
sourceTableCA
.
getFields
());
tableCA
.
setFields
(
sourceTableCA
.
getFields
());
}
}
}
}
...
@@ -148,7 +148,7 @@ public class ColumnCAGenerator implements CAGenerator {
...
@@ -148,7 +148,7 @@ public class ColumnCAGenerator implements CAGenerator {
Integer
cid
=
null
;
Integer
cid
=
null
;
for
(
int
j
=
0
;
j
<
this
.
columnCAS
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
this
.
columnCAS
.
size
();
j
++)
{
ColumnCA
columnCA1
=
(
ColumnCA
)
this
.
columnCAS
.
get
(
j
);
ColumnCA
columnCA1
=
(
ColumnCA
)
this
.
columnCAS
.
get
(
j
);
if
(
columnCA1
.
getTableCA
().
getId
()
==
tableCA
.
getId
(
)
&&
columnCA1
.
getName
().
equals
(
alias
))
{
if
(
columnCA1
.
getTableCA
().
getId
()
.
equals
(
tableCA
.
getId
()
)
&&
columnCA1
.
getName
().
equals
(
alias
))
{
isHad
=
true
;
isHad
=
true
;
cid
=
columnCA1
.
getId
();
cid
=
columnCA1
.
getId
();
break
;
break
;
...
...
dlink-core/src/main/java/com/dlink/explainer/lineage/LineageColumnGenerator.java
View file @
a3a27b22
...
@@ -68,7 +68,7 @@ public class LineageColumnGenerator {
...
@@ -68,7 +68,7 @@ public class LineageColumnGenerator {
private
void
matchSinkField
(
TableCA
tableCA
)
{
private
void
matchSinkField
(
TableCA
tableCA
)
{
for
(
ColumnCA
columnCA
:
columnCAS
)
{
for
(
ColumnCA
columnCA
:
columnCAS
)
{
if
(
columnCA
.
getTableId
()
==
tableCA
.
getId
(
))
{
if
(
columnCA
.
getTableId
()
.
equals
(
tableCA
.
getId
()
))
{
continue
;
continue
;
}
}
for
(
String
fieldName
:
tableCA
.
getFields
())
{
for
(
String
fieldName
:
tableCA
.
getFields
())
{
...
@@ -84,7 +84,7 @@ public class LineageColumnGenerator {
...
@@ -84,7 +84,7 @@ public class LineageColumnGenerator {
private
void
buildColumnCAFields
(
TableCA
tableCA
,
Integer
id
,
ColumnCA
columnCA
)
{
private
void
buildColumnCAFields
(
TableCA
tableCA
,
Integer
id
,
ColumnCA
columnCA
)
{
if
(
transMaps
.
get
(
id
)
instanceof
OperatorTrans
)
{
if
(
transMaps
.
get
(
id
)
instanceof
OperatorTrans
)
{
if
(
tableCA
.
getId
()
==
id
)
{
if
(
tableCA
.
getId
()
.
equals
(
id
)
)
{
return
;
return
;
}
}
OperatorTrans
trans
=
(
OperatorTrans
)
transMaps
.
get
(
id
);
OperatorTrans
trans
=
(
OperatorTrans
)
transMaps
.
get
(
id
);
...
@@ -115,13 +115,13 @@ public class LineageColumnGenerator {
...
@@ -115,13 +115,13 @@ public class LineageColumnGenerator {
Integer
cid
=
null
;
Integer
cid
=
null
;
for
(
Map
.
Entry
<
Integer
,
ColumnCA
>
item
:
columnCASMaps
.
entrySet
())
{
for
(
Map
.
Entry
<
Integer
,
ColumnCA
>
item
:
columnCASMaps
.
entrySet
())
{
ColumnCA
columnCA1
=
item
.
getValue
();
ColumnCA
columnCA1
=
item
.
getValue
();
if
(
columnCA1
.
getTableCA
().
getId
()
==
tableCA
.
getId
(
)
&&
columnCA1
.
getName
().
equals
(
alias
))
{
if
(
columnCA1
.
getTableCA
().
getId
()
.
equals
(
tableCA
.
getId
()
)
&&
columnCA1
.
getName
().
equals
(
alias
))
{
isHad
=
true
;
isHad
=
true
;
cid
=
columnCA1
.
getId
();
cid
=
columnCA1
.
getId
();
break
;
break
;
}
}
}
}
if
(
columnCA
.
getId
()
==
cid
)
{
if
(
columnCA
.
getId
()
.
equals
(
cid
)
)
{
return
;
return
;
}
}
if
(!
isHad
)
{
if
(!
isHad
)
{
...
@@ -180,7 +180,7 @@ public class LineageColumnGenerator {
...
@@ -180,7 +180,7 @@ public class LineageColumnGenerator {
private
void
buildSinkSuf
(
Integer
preId
,
Integer
sourcePreId
)
{
private
void
buildSinkSuf
(
Integer
preId
,
Integer
sourcePreId
)
{
for
(
NodeRel
nodeRel
:
columnCASRel
)
{
for
(
NodeRel
nodeRel
:
columnCASRel
)
{
if
(
nodeRel
.
getPreId
()
==
preId
)
{
if
(
nodeRel
.
getPreId
()
.
equals
(
preId
)
)
{
Integer
nextSufId
=
nodeRel
.
getSufId
();
Integer
nextSufId
=
nodeRel
.
getSufId
();
if
(
sinkColumns
.
contains
(
nextSufId
))
{
if
(
sinkColumns
.
contains
(
nextSufId
))
{
columnCASRelChain
.
add
(
new
NodeRel
(
sourcePreId
,
nextSufId
));
columnCASRelChain
.
add
(
new
NodeRel
(
sourcePreId
,
nextSufId
));
...
...
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