Repository: apache/shardingsphere (Java)

Issue:
No error exception when creating a sharding strategy by using a inconsistent type from the sharding algorithm type
## Bug Report



### Which version of ShardingSphere did you use?
master 9c83948cdb49af429851eb2eca9ce10da9dfb7a7
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Error exception by Invalid algorithms.
### Actual behavior
Successful created sharding strategy with no exception.
### Reason analyze (If you can)
The type verification of the type of the sharding strategy and the sharding algorithm may not be perfect.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1. add resource
```
ADD RESOURCE resource_0 (
    HOST="127.0.0.1",
    PORT=3306,
    DB="db0",
    USER="root",
    PASSWORD="123456"
);
```

2. create sharding algorithm 
```
CREATE SHARDING ALGORITHM database_inline 
(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_item_${order_id % 2}")));
```
3.  create sharding strategy 
```
CREATE DEFAULT SHARDING DATABASE STRATEGY
(TYPE="hint",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM=database_inline);
```

 
### Comments
In this issue, a sharding strategy of type hint is created using the inline sharding algorithm(the type should be standard). It's just an example . It does not mean that the problem only occurs in the inline algorithm and the hint type, the other two types(standard, complex) also have the same problem.



Discussion: Hi @Qianyi951015 
I found @sunkai-cai is working on the same issue.  Refer to #20777.
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
Hi @Qianyi951015 ,
I think this issue has been fixed by #22926, could you check it?
> Hi @Qianyi951015 , I think this issue has been fixed by #22926, could you check it?

sure i will check it
Hi @RaigorJiang I dont think this issue was fully fixed, as the figure shows below there is still no error exception when I was creating default sharding strategy by using `inline` algorithm  with `hint` type
![image](https://user-images.githubusercontent.com/57847965/215681248-3fbb42e4-dfd1-4422-adc3-688521b42f16.png)


@Qianyi951015 
Thank you, what about `CREATE SHARDING TABLE RULE`?
@RaigorJiang same
![image](https://user-images.githubusercontent.com/57847965/215691708-251e1faa-aa36-4a0c-a5c3-c0b793a2d432.png)

@Qianyi951015  Thank you for your verification, I will continue to investigate.



Fix (patch):
diff --git a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/enums/ShardingStrategyType.java b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/enums/ShardingStrategyType.java
index 10889db0ae856..907b9ce311d7a 100644
--- a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/enums/ShardingStrategyType.java
+++ b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/enums/ShardingStrategyType.java
@@ -96,7 +96,7 @@ public Collection<String> getConfigurationContents(final ShardingStrategyConfigu
         
         @Override
         public boolean isValid(final String shardingColumn) {
-            return true;
+            return null == shardingColumn;
         }
     },
     COMPLEX {