boyjoy1127 opened a new issue, #24289:
URL: https://github.com/apache/shardingsphere/issues/24289

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.3.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   Running integration test in 
`org.apache.shardingsphere.test.e2e.engine.dql.GeneralDQLE2EIT`
   
   Settings in it-env.properties is below:
   ```
   it.run.modes=Cluster
   it.run.additional.cases=false
   
   
#it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,rdl_empty_rules,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding
   it.scenarios=db
   # it.cluster.env.type=DOCKER,NATIVE
   it.cluster.env.type=DOCKER
   
   # it.cluster.adapters=jdbc,proxy
   it.cluster.adapters=proxy
   
   # it.cluster.databases=MySQL,PostgreSQL,openGauss
   it.cluster.databases=PostgreSQL
   ```
   Add a test in 'dql-integration-test-cases.xml'
   ```
       <test-case sql="SELECT * FROM t_product p INNER JOIN t_product_detail d 
ON p.product_id = d.product_id WHERE p.creation_date = ?" 
db-types="MySQL,PostgreSQL,openGauss" scenario-types="db">
           <assertion parameters="2017-08-08:Date" 
expected-data-source-name="read_dataset" />
       </test-case>
   ```
   
   'PostgreSQLComParsePacket.readParameterType() '  analyze the date type
   ```
       public List<PostgreSQLColumnType> readParameterTypes() {
           int parameterCount = payload.readInt2();
           List<PostgreSQLColumnType> result = new ArrayList<>(parameterCount);
           for (int i = 0; i < parameterCount; i++) {
               result.add(PostgreSQLColumnType.valueOf(payload.readInt4()));
           }
           return result;
       }
   ```
   
   Expect the date type in 'result' could be analyzed as 'Date'.
   ### Actual behavior
   Actually the date type is analyzed as 'POSTGRESQL_TYPE_UNSPECIFIED',' 
PostgreSQLTypeUnspecifiedSQLParameter '.
   
   
   ### Reason analyze (If you can)
   I suspect the proxy frontend hasn't support the date type yet.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   Running integration test in 
`org.apache.shardingsphere.test.e2e.engine.dql.GeneralDQLE2EIT`
   
   Settings in it-env.properties is below:
   ```
   it.run.modes=Cluster
   it.run.additional.cases=false
   
   
#it.scenarios=db,tbl,readwrite_splitting,encrypt,shadow,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt,rdl_empty_rules,empty_rules,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt_shadow,readwrite_splitting_and_shadow,sharding_and_shadow,sharding_encrypt_shadow,mask,mask_encrypt,mask_sharding,mask_encrypt_sharding
   it.scenarios=db
   # it.cluster.env.type=DOCKER,NATIVE
   it.cluster.env.type=DOCKER
   
   # it.cluster.adapters=jdbc,proxy
   it.cluster.adapters=proxy
   
   # it.cluster.databases=MySQL,PostgreSQL,openGauss
   it.cluster.databases=PostgreSQL
   ```
   Add a test in 'dql-integration-test-cases.xml'
   ```
       <test-case sql="SELECT * FROM t_product p INNER JOIN t_product_detail d 
ON p.product_id = d.product_id WHERE p.creation_date = ?" 
db-types="MySQL,PostgreSQL,openGauss" scenario-types="db">
           <assertion parameters="2017-08-08:Date" 
expected-data-source-name="read_dataset" />
       </test-case>
   ```
   
   'PostgreSQLComParsePacket.readParameterType() '  analyze the date type
   ```
       public List<PostgreSQLColumnType> readParameterTypes() {
           int parameterCount = payload.readInt2();
           List<PostgreSQLColumnType> result = new ArrayList<>(parameterCount);
           for (int i = 0; i < parameterCount; i++) {
               result.add(PostgreSQLColumnType.valueOf(payload.readInt4()));
           }
           return result;
       }
   ```
   
   ### Example codes for reproduce this issue (such as a github link).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to