mshustov commented on code in PR #24424:
URL: https://github.com/apache/beam/pull/24424#discussion_r1039367689
##########
sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/TableSchema.java:
##########
@@ -289,40 +289,42 @@ public static ColumnType parse(String str) {
* @return value of ClickHouse expression
*/
public static Object parseDefaultExpression(ColumnType columnType, String
str) {
- try {
- String value =
- new org.apache.beam.sdk.io.clickhouse.impl.parser.ColumnTypeParser(
- new StringReader(str))
- .parseDefaultExpression();
-
- switch (columnType.typeName()) {
- case INT8:
- return Byte.valueOf(value);
- case INT16:
- return Short.valueOf(value);
- case INT32:
- return Integer.valueOf(value);
- case INT64:
- return Long.valueOf(value);
- case ENUM16:
- case ENUM8:
- case FIXEDSTRING:
- case STRING:
- return value;
- case UINT8:
- return Short.valueOf(value);
- case UINT16:
- return Integer.valueOf(value);
- case UINT32:
- return Long.valueOf(value);
- case UINT64:
- return Long.valueOf(value);
- default:
- throw new UnsupportedOperationException("Unsupported type: " +
columnType);
- }
- } catch (org.apache.beam.sdk.io.clickhouse.impl.parser.ParseException e)
{
- throw new IllegalArgumentException("failed to parse", e);
+ // try {
+ String value = str;
+ /*
+ String value =
Review Comment:
can be removed?
--
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]