xuzifu666 commented on code in PR #4287:
URL: https://github.com/apache/calcite/pull/4287#discussion_r2034513039
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -2514,9 +2514,8 @@ private SqlDialect nonOrdinalDialect() {
*/
@Test void testCastArrayCharset() {
final String query = "select cast(array['a', 'b', 'c'] as varchar array)";
- final String expected = "SELECT CAST(ARRAY ('a', 'b', 'c') AS VARCHAR
ARRAY)";
Review Comment:
**This case also not support in HiveSQL, so change it.**
test result:
SELECT CAST(ARRAY ('a', 'b', 'c') AS VARCHAR ARRAY);
FAILED: ParseException line 1:45 mismatched input 'ARRAY' expecting ( near
'VARCHAR' in primitive type specification
MismatchedTokenException(35!=334)
at
org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:617)
at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
at
org.apache.hadoop.hive.ql.parse.HiveParser.primitiveType(HiveParser.java:36225)
at
org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.castExpression(HiveParser_IdentifiersParser.java:3811)
at
org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.atomExpression(HiveParser_IdentifiersParser.java:6757)
at
org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.precedenceFieldExpression(HiveParser_IdentifiersParser.java:6962)
at
org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.precedenceUnaryPrefixExpression(HiveParser_IdentifiersParser.java:7298)
--
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]