-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge from dev/obcloud_202409 into main (#3744)
merge from dev/obcloud_202409 into main
- Loading branch information
Showing
196 changed files
with
8,909 additions
and
983 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,4 @@ maven/ | |
venv/ | ||
**/local-unit-test.properties | ||
**/integration-test.properties | ||
**/oss_temp_dir/ |
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
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
61 changes: 61 additions & 0 deletions
61
...-parser/src/main/java/com/oceanbase/tools/sqlparser/statement/common/mysql/ArrayType.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,61 @@ | ||
/* | ||
* Copyright (c) 2023 OceanBase. | ||
* | ||
* 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 com.oceanbase.tools.sqlparser.statement.common.mysql; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.antlr.v4.runtime.ParserRuleContext; | ||
|
||
import com.oceanbase.tools.sqlparser.statement.BaseStatement; | ||
import com.oceanbase.tools.sqlparser.statement.common.DataType; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
import lombok.Setter; | ||
|
||
/** | ||
* @Author: Lebie | ||
* @Date: 2024/10/14 17:27 | ||
* @Description: [] | ||
*/ | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = false) | ||
public class ArrayType extends BaseStatement implements DataType { | ||
private final String typeName = "ARRAY"; | ||
private final DataType elementType; | ||
|
||
public ArrayType(@NonNull ParserRuleContext context, @NonNull DataType elementType) { | ||
super(context); | ||
this.elementType = elementType; | ||
} | ||
|
||
public ArrayType(DataType elementType) { | ||
this.elementType = elementType; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return this.typeName; | ||
} | ||
|
||
@Override | ||
public List<String> getArguments() { | ||
return Collections.emptyList(); | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
...parser/src/main/java/com/oceanbase/tools/sqlparser/statement/common/mysql/VectorType.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,71 @@ | ||
/* | ||
* Copyright (c) 2023 OceanBase. | ||
* | ||
* 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 com.oceanbase.tools.sqlparser.statement.common.mysql; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.antlr.v4.runtime.ParserRuleContext; | ||
|
||
import com.oceanbase.tools.sqlparser.statement.BaseStatement; | ||
import com.oceanbase.tools.sqlparser.statement.common.DataType; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
import lombok.Setter; | ||
|
||
/** | ||
* @Author: Lebie | ||
* @Date: 2024/10/14 17:14 | ||
* @Description: [] | ||
*/ | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = false) | ||
public class VectorType extends BaseStatement implements DataType { | ||
private final String typeName; | ||
private final Integer dimension; | ||
|
||
public VectorType(@NonNull ParserRuleContext context, | ||
@NonNull String typeName, @NonNull Integer dimension) { | ||
super(context); | ||
this.typeName = typeName; | ||
this.dimension = dimension; | ||
} | ||
|
||
public VectorType(@NonNull String typeName, @NonNull Integer dimension) { | ||
this.typeName = typeName; | ||
this.dimension = dimension; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return this.typeName; | ||
} | ||
|
||
@Override | ||
public List<String> getArguments() { | ||
return Collections.singletonList(String.valueOf(this.dimension)); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder builder = new StringBuilder(getName()); | ||
builder.append("(").append(dimension).append(")"); | ||
return builder.toString(); | ||
} | ||
} |
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
53 changes: 53 additions & 0 deletions
53
...ser/src/main/java/com/oceanbase/tools/sqlparser/statement/expression/ArrayExpression.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,53 @@ | ||
/* | ||
* Copyright (c) 2023 OceanBase. | ||
* | ||
* 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 com.oceanbase.tools.sqlparser.statement.expression; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
import org.antlr.v4.runtime.ParserRuleContext; | ||
|
||
import com.oceanbase.tools.sqlparser.statement.Expression; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
|
||
/** | ||
* @Author: Lebie | ||
* @Date: 2024/10/14 21:00 | ||
* @Description: [] | ||
*/ | ||
@Getter | ||
@EqualsAndHashCode(callSuper = true) | ||
public class ArrayExpression extends BaseExpression { | ||
private List<Expression> expressions = new ArrayList<>(); | ||
|
||
public ArrayExpression(@NonNull ParserRuleContext context, @NonNull List<Expression> expressions) { | ||
super(context); | ||
this.expressions = expressions; | ||
} | ||
|
||
public ArrayExpression(@NonNull List<Expression> expressions) { | ||
this.expressions = expressions; | ||
} | ||
|
||
@Override | ||
protected String doToString() { | ||
return "[" + this.expressions.stream().map(Object::toString).collect(Collectors.joining(",")) + "]"; | ||
} | ||
} |
Oops, something went wrong.