@Override public void initialize(Configuration configuration, Properties properties) throws SerDeException { tsTZTypeInfo = new TimestampLocalTZTypeInfo(configuration.get(HiveConf.ConfVars.HIVE_LOCAL_TIME_ZONE.varname)); // Druid query final String druidQuery = properties.getProperty(Constants.DRUID_QUERY_JSON, null); if (druidQuery != null && !druidQuery.isEmpty()) { initFromDruidQueryPlan(properties, druidQuery); } else { // No query. Either it is a CTAS, or we need to create a Druid meta data Query if (!org.apache.commons.lang3.StringUtils.isEmpty(properties.getProperty(serdeConstants.LIST_COLUMNS)) && !org.apache.commons.lang3.StringUtils.isEmpty(properties.getProperty(serdeConstants.LIST_COLUMN_TYPES))) { // CASE CTAS statement initFromProperties(properties); } else { // Segment Metadata query that retrieves all columns present in // the data source (dimensions and metrics). initFromMetaDataQuery(configuration, properties); } } if (LOG.isDebugEnabled()) { LOG.debug("DruidSerDe initialized with\n" + "\t columns: " + Arrays.toString(columns) + "\n\t types: " + Arrays.toString(types)); } }
final TimestampLocalTZTypeInfo tsTZTypeInfo = new TimestampLocalTZTypeInfo( conf.get(ConfVars.HIVE_LOCAL_TIME_ZONE.varname)); for (int i = 0; i < columnTypes.size(); i++) {
return null; return new TimestampLocalTZTypeInfo(parts.typeParams[0]); default: return null;
TimestampLocalTZTypeInfo timestampLocalTZTypeInfo = new TimestampLocalTZTypeInfo(); HiveConf conf; try {
final TimestampLocalTZTypeInfo tsTZTypeInfo = new TimestampLocalTZTypeInfo( conf.get(ConfVars.HIVE_LOCAL_TIME_ZONE.varname)); for (int i = 0; i < columnTypes.size(); i++) {
return null; return new TimestampLocalTZTypeInfo(parts.typeParams[0]); default: return null;