LakshSingla commented on a change in pull request #12163:
URL: https://github.com/apache/druid/pull/12163#discussion_r801046960
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlParserUtils.java
##########
@@ -38,20 +39,22 @@
public class DruidSqlParserUtils
{
+
+ private static final Logger log = new Logger(DruidSqlParserUtils.class);
+
/**
* Delegates to {@code convertSqlNodeToGranularity} and converts the
exceptions to {@link ParseException}
* with the underlying message
*/
public static Granularity
convertSqlNodeToGranularityThrowingParseExceptions(SqlNode sqlNode) throws
ParseException
{
- Granularity g;
try {
- g = convertSqlNodeToGranularity(sqlNode);
+ return convertSqlNodeToGranularity(sqlNode);
}
catch (Exception e) {
+ log.error(e, StringUtils.format("Unable to convert %s to a valid
granularity.", sqlNode.toString()));
Review comment:
Updated with the correct level, thanks for the explanation.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]