forked from dingodb/dingo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature][dingo-executor]Support trace for insert, select limit and
order by
- Loading branch information
1 parent
0d00dc9
commit e2f258a
Showing
12 changed files
with
263 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
dingo-calcite/src/main/java/io/dingodb/calcite/grammar/dml/SqlInsert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2021 DataCanvas | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.dingodb.calcite.grammar.dml; | ||
|
||
import lombok.Getter; | ||
import org.apache.calcite.sql.SqlIdentifier; | ||
import org.apache.calcite.sql.SqlNode; | ||
import org.apache.calcite.sql.SqlNumericLiteral; | ||
import org.apache.calcite.sql.SqlNodeList; | ||
import org.apache.calcite.sql.parser.SqlParserPos; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
||
/** | ||
* add trace | ||
*/ | ||
public class SqlInsert extends org.apache.calcite.sql.SqlInsert { | ||
|
||
@Getter | ||
private boolean trace; | ||
|
||
public SqlInsert(SqlParserPos pos, | ||
SqlNodeList keywords, | ||
SqlNode targetTable, | ||
SqlNode source, | ||
@Nullable SqlNodeList columnList, | ||
@Nullable boolean trace) { | ||
super(pos, keywords, targetTable, source, columnList); | ||
this.trace = trace; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
dingo-calcite/src/main/java/io/dingodb/calcite/grammar/dql/SqlOrderBy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2021 DataCanvas | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.dingodb.calcite.grammar.dql; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.calcite.sql.SqlNode; | ||
import org.apache.calcite.sql.SqlNodeList; | ||
import org.apache.calcite.sql.parser.SqlParserPos; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
||
@Getter | ||
@Setter | ||
public class SqlOrderBy extends org.apache.calcite.sql.SqlOrderBy { | ||
private boolean trace; | ||
|
||
public SqlOrderBy(SqlParserPos pos, | ||
SqlNode query, | ||
SqlNodeList orderList, | ||
@Nullable SqlNode offset, | ||
@Nullable SqlNode fetch, | ||
@Nullable boolean trace) { | ||
super(pos, query, orderList, offset, fetch); | ||
this.trace = trace; | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
dingo-calcite/src/main/java/io/dingodb/calcite/grammar/dql/SqlTraceSelect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright 2021 DataCanvas | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.dingodb.calcite.grammar.dql; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.calcite.sql.SqlNode; | ||
import org.apache.calcite.sql.SqlNodeList; | ||
import org.apache.calcite.sql.parser.SqlParserPos; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
|
||
import java.util.UUID; | ||
|
||
@Getter | ||
public class SqlTraceSelect extends SqlSelect { | ||
|
||
@Setter | ||
ExportOptions exportOptions; | ||
|
||
boolean trace; | ||
|
||
public SqlTraceSelect(SqlParserPos pos, | ||
@Nullable SqlNodeList keywordList, | ||
SqlNodeList selectList, | ||
@Nullable SqlNode from, | ||
@Nullable SqlNode where, | ||
@Nullable SqlNodeList groupBy, | ||
@Nullable SqlNode having, | ||
@Nullable SqlNodeList windowDecls, | ||
@Nullable SqlNodeList orderBy, | ||
@Nullable SqlNode offset, | ||
@Nullable SqlNode fetch, | ||
@Nullable SqlNodeList hints, | ||
ExportOptions exportOptions, | ||
boolean trace) { | ||
super(pos, keywordList, selectList, from, where, groupBy, having, windowDecls, orderBy, offset, fetch, hints); | ||
this.exportOptions = exportOptions; | ||
this.trace = trace; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.