Skip to content

Commit

Permalink
[Refactor] Rename Package from privilege to authorization and optimiz…
Browse files Browse the repository at this point in the history
…e import (#53826)

(cherry picked from commit 4840470)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/catalog/DictionaryMgr.java
#	fe/fe-core/src/main/java/com/starrocks/planner/OlapTableSink.java
#	fe/fe-core/src/main/java/com/starrocks/planner/PlanNode.java
#	fe/fe-core/src/main/java/com/starrocks/qe/SetDefaultRoleExecutor.java
#	fe/fe-core/src/main/java/com/starrocks/qe/SetRoleExecutor.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/LoadStmtTest.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/SetPassVarTest.java
#	fe/fe-core/src/test/java/com/starrocks/planner/OlapTableSinkTest.java
#	fe/fe-core/src/test/java/com/starrocks/planner/StreamLoadPlannerTest.java
  • Loading branch information
HangyuanLiu authored and mergify[bot] committed Dec 13, 2024
1 parent ca834d0 commit 6f726be
Show file tree
Hide file tree
Showing 209 changed files with 406 additions and 416 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.starrocks.authentication.AuthenticationMgr;
import com.starrocks.authorization.PrivilegeBuiltinConstants;
import com.starrocks.catalog.BaseTableInfo;
import com.starrocks.catalog.Column;
import com.starrocks.catalog.Database;
Expand Down Expand Up @@ -74,7 +75,6 @@
import com.starrocks.persist.metablock.SRMetaBlockID;
import com.starrocks.persist.metablock.SRMetaBlockReader;
import com.starrocks.persist.metablock.SRMetaBlockWriter;
import com.starrocks.privilege.PrivilegeBuiltinConstants;
import com.starrocks.qe.ConnectContext;
import com.starrocks.scheduler.Task;
import com.starrocks.scheduler.TaskBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

import com.google.common.collect.Sets;
import com.google.gson.annotations.SerializedName;
import com.starrocks.authorization.PrivilegeBuiltinConstants;
import com.starrocks.catalog.Database;
import com.starrocks.catalog.MaterializedIndex;
import com.starrocks.catalog.MaterializedIndexMeta;
Expand All @@ -49,7 +50,6 @@
import com.starrocks.common.util.concurrent.lock.LockType;
import com.starrocks.common.util.concurrent.lock.Locker;
import com.starrocks.persist.gson.GsonUtils;
import com.starrocks.privilege.PrivilegeBuiltinConstants;
import com.starrocks.qe.ConnectContext;
import com.starrocks.server.GlobalStateMgr;
import com.starrocks.server.WarehouseManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.annotations.SerializedName;
import com.starrocks.authorization.PrivilegeBuiltinConstants;
import com.starrocks.catalog.Database;
import com.starrocks.catalog.DistributionInfo;
import com.starrocks.catalog.MaterializedIndex;
Expand All @@ -45,7 +46,6 @@
import com.starrocks.persist.ReplacePartitionOperationLog;
import com.starrocks.persist.gson.GsonPostProcessable;
import com.starrocks.persist.gson.GsonUtils;
import com.starrocks.privilege.PrivilegeBuiltinConstants;
import com.starrocks.qe.ConnectContext;
import com.starrocks.qe.QueryState;
import com.starrocks.qe.SessionVariable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.starrocks.catalog.PartitionKey;
import com.starrocks.catalog.Table;
import com.starrocks.common.IdGenerator;
Expand All @@ -45,7 +44,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.starrocks.catalog.Function;
import com.starrocks.catalog.FunctionSet;
import com.starrocks.catalog.Type;
import com.starrocks.sql.analyzer.SemanticException;
import com.starrocks.sql.ast.AstVisitor;
import com.starrocks.thrift.TDictQueryExpr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
package com.starrocks.analysis;

import com.starrocks.cluster.ClusterNamespace;
import com.starrocks.sql.analyzer.FeNameFormat;
import com.starrocks.common.io.Text;
import com.starrocks.common.io.Writable;
import com.starrocks.qe.ConnectContext;
import com.starrocks.sql.analyzer.AnalyzerUtils;
import com.starrocks.sql.analyzer.FeNameFormat;
import com.starrocks.sql.parser.NodePosition;
import org.apache.commons.lang.builder.HashCodeBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import static com.starrocks.sql.common.ErrorMsgProxy.PARSER_ERROR_MSG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@

package com.starrocks.analysis;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import com.starrocks.catalog.ArrayType;
import com.starrocks.catalog.Column;
import com.starrocks.catalog.KeysType;
import com.starrocks.common.Config;
import com.starrocks.catalog.IndexParams;
import com.starrocks.catalog.IndexParams.IndexParamItem;
import com.starrocks.catalog.IndexParams.IndexParamType;
import com.starrocks.catalog.KeysType;
import com.starrocks.common.Config;
import com.starrocks.common.VectorIndexParams;
import com.starrocks.common.VectorIndexParams.CommonIndexParamKey;
import com.starrocks.common.VectorIndexParams.IndexParamsKey;
Expand All @@ -40,6 +30,16 @@
import com.starrocks.sql.analyzer.SemanticException;
import com.starrocks.sql.ast.IndexDef.IndexType;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

public class VectorIndexUtil {

public static void checkVectorIndexValid(Column column, Map<String, String> properties, KeysType keysType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

import com.google.gson.annotations.SerializedName;
import com.starrocks.StarRocksFE;
import com.starrocks.authorization.AuthorizationMgr;
import com.starrocks.authorization.PrivilegeException;
import com.starrocks.authorization.UserPrivilegeCollectionV2;
import com.starrocks.common.Config;
import com.starrocks.common.DdlException;
import com.starrocks.common.Pair;
Expand All @@ -28,9 +31,6 @@
import com.starrocks.persist.metablock.SRMetaBlockID;
import com.starrocks.persist.metablock.SRMetaBlockReader;
import com.starrocks.persist.metablock.SRMetaBlockWriter;
import com.starrocks.privilege.AuthorizationMgr;
import com.starrocks.privilege.PrivilegeException;
import com.starrocks.privilege.UserPrivilegeCollectionV2;
import com.starrocks.server.GlobalStateMgr;
import com.starrocks.sql.analyzer.SemanticException;
import com.starrocks.sql.ast.CreateUserStmt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.authorization.ranger.RangerAccessController;
import com.starrocks.catalog.InternalCatalog;
import com.starrocks.privilege.ranger.RangerAccessController;
import com.starrocks.sql.analyzer.AuthorizerStmtVisitor;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.analysis.Expr;
import com.starrocks.analysis.TableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.catalog.InternalCatalog;
import com.starrocks.common.ErrorCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.server.GlobalStateMgr;
import com.starrocks.sql.ast.UserIdentity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.gson.annotations.SerializedName;
import com.starrocks.catalog.Catalog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.collect.Maps;
import com.starrocks.analysis.TableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.base.Preconditions;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.collect.Lists;
import com.starrocks.server.GlobalStateMgr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// 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.starrocks.privilege;
package com.starrocks.authorization;

public abstract class ExternalAccessController implements AccessController {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.server.GlobalStateMgr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.base.Objects;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.base.Objects;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.catalog.Database;
import com.starrocks.catalog.InternalCatalog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.starrocks.server.GlobalStateMgr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.collect.Lists;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

public class PolicyFCEntryObject extends ForwardCompatiblePEntryObject {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

public class PrivObjNotFoundException extends PrivilegeException {
public PrivObjNotFoundException(String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import java.util.Arrays;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.gson.annotations.SerializedName;
import com.starrocks.persist.gson.GsonPostProcessable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.gson.annotations.SerializedName;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.


package com.starrocks.privilege;
package com.starrocks.authorization;

public class PrivilegeException extends Exception {
public PrivilegeException(String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.starrocks.privilege;
package com.starrocks.authorization;

import com.google.common.collect.ImmutableSet;

Expand Down
Loading

0 comments on commit 6f726be

Please sign in to comment.