Skip to content

Commit

Permalink
5.4.18-16986514 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ZSYTY committed Oct 30, 2023
1 parent ea280c4 commit dfd99e4
Show file tree
Hide file tree
Showing 4,404 changed files with 386,812 additions and 40,841 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ The CDC Node provides change data capture capability that is fully compatible wi

PolarDB-X provides tool to manage the above components through K8S Operator, and the RPC between the CN and DN can be done through private protocol component. The corresponding repositories of these components are as follows.

| **Component Name** | **Repository** | **Version** |
|---------------------------|-------------------------------------------------------------------|---|
| CN (Compute Node) | [polardbx-sql](https://github.com/polardb/polardbx-sql) | v5.4.13-16615127 |
| GMS (Global Meta Service) | [polardbx-engine](https://github.com/polardb/polardbx-engine) | v1.0.2 |
| DN (Data Node) | [polardbx-engine](https://github.com/polardb/polardbx-engine) | v1.0.2 |
| CDC (Change Data Capture) | [polardbx-cdc](https://github.com/polardb/polardbx-cdc) | v5.4.13 |
| RPC | [polardbx-glue](https://github.com/polardb/polardbx-glue) | v5.4.13-16615127 |
| K8S Operator | [polardbx-operator](https://github.com/polardb/polardbx-operator) | v1.2.2 |
| **Component Name** | **Repository** | **Version** |
|---------------------------|-------------------------------------------------------------------|----------------|
| CN (Compute Node) | [polardbx-sql](https://github.com/polardb/polardbx-sql) | v5.4.18-16986514 |
| GMS (Global Meta Service) | [polardbx-engine](https://github.com/polardb/polardbx-engine) | 2.0.1 |
| DN (Data Node) | [polardbx-engine](https://github.com/polardb/polardbx-engine) | 2.0.1 |
| CDC (Change Data Capture) | [polardbx-cdc](https://github.com/polardb/polardbx-cdc) | v5.4.18 |
| RPC | [polardbx-glue](https://github.com/polardb/polardbx-glue) | v5.4.18-16986514 |
| K8S Operator | [polardbx-operator](https://github.com/polardb/polardbx-operator) | v1.5.0 |


## What is PolarDB-X SQL ?
Expand Down
21 changes: 0 additions & 21 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
FROM polardbx/polardbxbasejava:20221129

WORKDIR /home/admin

COPY polardbx-server/target/polardbx-server drds-server
COPY docker/admin/bin/* /home/admin/bin/
COPY docker/etc/* /tmp/
COPY docker/entrypoint.sh entrypoint.sh

RUN \
chmod a+x bin/* && \
chmod a+x entrypoint.sh && \
chown admin:admin -R /home/admin && \
cp /tmp/drds /etc/logrotate.d/drds && \
cp /tmp/log_cleaner /etc/cron.d/log_cleaner && \
true

USER admin

# Set command to entrypoint.sh
ENTRYPOINT /home/admin/entrypoint.sh
2 changes: 0 additions & 2 deletions docker/etc/log_cleaner
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
*/1 * * * * root /home/admin/bin/log_cleaner.sh 90 >/dev/null 2>&1

File renamed without changes.
4 changes: 2 additions & 2 deletions polardbx-calcite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ limitations under the License.
<parent>
<artifactId>polardbx</artifactId>
<groupId>com.alibaba.polardbx</groupId>
<version>5.4.15-SNAPSHOT</version>
<version>5.4.18-SNAPSHOT</version>
</parent>
<artifactId>polardbx-calcite</artifactId>
<packaging>jar</packaging>
<version>5.4.15-SNAPSHOT</version>
<version>5.4.18-SNAPSHOT</version>
<description>Core Calcite APIs and engine.</description>
<name>${project.artifactId} module for polardbx ${project.version}</name>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3843,6 +3843,23 @@ public RexNode visitInputRef(RexInputRef inputRef) {
}
}

/** Shuttle that finds the set of inputs in equality that are used. */
public static class EquivalentInputReferencedVisitor extends InputReferencedVisitor {

@Override
public RexNode visitCall(RexCall call) {
boolean[] update = {false};
switch (call.getOperator().getKind()) {
case EQUALS:
case IS_NOT_DISTINCT_FROM:
case AND:
visitList(call.operands, update);
default:
return call;
}
}
}

/** Converts types to descriptive strings. */
public static class TypeDumper {
private final String extraIndent = " ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import org.apache.calcite.sql.SqlRenameTable;
import org.apache.calcite.sql.dialect.MysqlSqlDialect;

import java.util.List;

/**
* ${DESCRIPTION}
*
Expand All @@ -53,6 +55,10 @@ public class DDL extends AbstractRelNode {

protected final SqlDdl ddl;

// for muti table ddl, like rename table
private List<SqlNode> tableNameList;
private List<SqlNode> newTableNameList;

/**
* Creates a <code>SingleRel</code>.
*
Expand All @@ -79,6 +85,14 @@ public void setTableName(SqlNode tableName) {
this.tableName = tableName;
}

public List<SqlNode> getTableNameList() {
return tableNameList;
}

public void setTableNameList(List<SqlNode> tableNameList) {
this.tableNameList = tableNameList;
}

public SqlNode getNewTableName() {
if (sqlNode instanceof SqlRenameTable) {
return ((SqlRenameTable) sqlNode).getRenamedNode();
Expand All @@ -90,6 +104,14 @@ public void setNewTableName(SqlNode newTableName) {
this.newTableName = newTableName;
}

public List<SqlNode> getNewTableNameList() {
return newTableNameList;
}

public void setNewTableNameList(List<SqlNode> newTableNameList) {
this.newTableNameList = newTableNameList;
}

public boolean isPartition() {
return isPartition;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright [2013-2021], Alibaba Group Holding Limited
*
* 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 org.apache.calcite.rel.core;

import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptPlanner;
import org.apache.calcite.plan.RelTraitSet;
import org.apache.calcite.rel.BiRel;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.RelWriter;
import org.apache.calcite.rel.externalize.RelDrdsWriter;
import org.apache.calcite.rel.metadata.RelMetadataQuery;
import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rex.RexNode;

import java.util.List;

/**
* left rel is anchor part, right rel is body part
*
* @author fangwu
*/
public class RecursiveCTE extends BiRel {
private String cteName;

// special limit grammar for recursive cte
private RexNode offset;
private RexNode fetch;

public RecursiveCTE(RelOptCluster cluster, RelTraitSet traitSet,
RelNode left, RelNode right, String cteName, RexNode offset, RexNode fetch) {
// left -> anchor part; right -> recursive part
super(cluster, traitSet, left, right);
this.cteName = cteName;
this.offset = offset;
this.fetch = fetch;
}

/**
* recursive rowtype must be same with anchor part
*/
protected RelDataType deriveRowType() {
return left.getRowType();
}

@Override
public RelWriter explainTermsForDisplay(RelWriter pw) {
pw.item(RelDrdsWriter.REL_NAME, "RecursiveCTE");
pw.item("cte_name", cteName);
pw.item("offset", offset);
pw.item("fetch", fetch);
return pw;
}

@Override
public void explainForDisplay(RelWriter pw) {
explainTermsForDisplay(pw).done(this);
}

@Override
public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) {
if (getInputs().equals(inputs)
&& traitSet == getTraitSet()) {
return this;
}
return new RecursiveCTE(getCluster(), traitSet, inputs.get(0), inputs.get(1), cteName, offset, fetch);
}

@Override
public RelOptCost computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq) {
RelOptCost relOptCost = left.computeSelfCost(planner, mq);
return planner.getCostFactory()
.makeCost(relOptCost.getRows() * 1000, relOptCost.getCpu() * 1000, relOptCost.getMemory(),
relOptCost.getIo(),
relOptCost.getNet());
}

public String getCteName() {
return cteName;
}

public RexNode getOffset() {
return offset;
}

public RexNode getFetch() {
return fetch;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright [2013-2021], Alibaba Group Holding Limited
*
* 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 org.apache.calcite.rel.core;

import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptPlanner;
import org.apache.calcite.plan.RelTraitSet;
import org.apache.calcite.rel.AbstractRelNode;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.RelWriter;
import org.apache.calcite.rel.externalize.RelDrdsWriter;
import org.apache.calcite.rel.metadata.RelMetadataQuery;
import org.apache.calcite.rel.type.RelDataType;

import java.util.List;

/**
* @author fangwu
*/
public class RecursiveCTEAnchor extends AbstractRelNode {
private final String cteName;

public RecursiveCTEAnchor(RelOptCluster cluster, RelTraitSet traitSet,
String cteName, RelDataType rowtype) {
super(cluster, traitSet);
this.cteName = cteName;
this.rowType = rowtype;
}

public String getCteName() {
return cteName;
}

@Override
public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) {
if (getInputs().equals(inputs)
&& traitSet == getTraitSet()) {
return this;
}
return new RecursiveCTEAnchor(getCluster(), traitSet, cteName, rowType);
}

@Override
public RelWriter explainTermsForDisplay(RelWriter pw) {
pw.item(RelDrdsWriter.REL_NAME, "RecursiveCTEAnchor");
pw.item("cte_target", cteName);
return pw;
}

@Override
public RelOptCost computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq) {
return planner.getCostFactory().makeCost(1.0, 1.0, 0.0, 0.0, 0.0);
}
}
Loading

0 comments on commit dfd99e4

Please sign in to comment.