Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210360228
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210360228
Commits
32aa8823
Commit
32aa8823
authored
Oct 14, 2019
by
Simon Liu
Committed by
dutor
Oct 14, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Fixed an undefined behavior. (#1039)
2 Replace static_cast with dynamic_cast.
parent
431f2348
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/executor/FetchExecutor.cpp
+2
-2
2 additions, 2 deletions
src/executor/FetchExecutor.cpp
with
2 additions
and
2 deletions
src/executor/FetchExecutor.cpp
+
2
−
2
View file @
32aa8823
...
@@ -34,11 +34,11 @@ Status FetchExecutor::prepareYield() {
...
@@ -34,11 +34,11 @@ Status FetchExecutor::prepareYield() {
// such as YIELD 1+1, it has not type in schema, the type from the eval()
// such as YIELD 1+1, it has not type in schema, the type from the eval()
colTypes_
.
emplace_back
(
nebula
::
cpp2
::
SupportedType
::
UNKNOWN
);
colTypes_
.
emplace_back
(
nebula
::
cpp2
::
SupportedType
::
UNKNOWN
);
if
(
col
->
expr
()
->
isAliasExpression
())
{
if
(
col
->
expr
()
->
isAliasExpression
())
{
colNames_
.
emplace_back
(
*
stat
ic_cast
<
Input
PropertyExpression
*>
(
col
->
expr
())
->
prop
());
colNames_
.
emplace_back
(
*
dynam
ic_cast
<
Alias
PropertyExpression
*>
(
col
->
expr
())
->
prop
());
continue
;
continue
;
}
else
if
(
col
->
expr
()
->
isTypeCastingExpression
())
{
}
else
if
(
col
->
expr
()
->
isTypeCastingExpression
())
{
// type cast
// type cast
auto
exprPtr
=
stat
ic_cast
<
TypeCastingExpression
*>
(
col
->
expr
());
auto
exprPtr
=
dynam
ic_cast
<
TypeCastingExpression
*>
(
col
->
expr
());
colTypes_
.
back
()
=
ColumnTypeToSupportedType
(
exprPtr
->
getType
());
colTypes_
.
back
()
=
ColumnTypeToSupportedType
(
exprPtr
->
getType
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment