@Override
    public String getName()
    {
        return name.toLowerCase(ENGLISH);
    }
@Test
    public void testTimeFieldInPinotSchemaToPinotColumns()
    {
        PinotConfig pinotConfig = new PinotConfig();
        pinotConfig.setInferDateTypeInSchema(true);
        pinotConfig.setInferTimestampTypeInSchema(true);

        // Test Date
        Schema testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.INT, TimeUnit.DAYS, "daysSinceEpoch"), new TimeGranularitySpec(FieldSpec.DataType.INT, TimeUnit.DAYS, "daysSinceEpoch"))
                .build();
        List<PinotColumn> pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        PinotColumn column = pinotColumns.get(0);
        assertEquals(column.getName(), "daysSinceEpoch");
        assertEquals(column.getType(), DateType.DATE);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.MILLISECONDS, "millisSinceEpoch"),
                        new TimeGranularitySpec(FieldSpec.DataType.INT, TimeUnit.DAYS, "daysSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "daysSinceEpoch");
        assertEquals(column.getType(), DateType.DATE);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        // Test Timestamp
        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.MILLISECONDS, "millisSinceEpoch"), new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.MILLISECONDS, "millisSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "millisSinceEpoch");
        assertEquals(column.getType(), TimestampType.TIMESTAMP);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.INT, TimeUnit.DAYS, "daysSinceEpoch"),
                        new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.MILLISECONDS, "millisSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "millisSinceEpoch");
        assertEquals(column.getType(), TimestampType.TIMESTAMP);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        // Test fallback to BIGINT
        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.SECONDS, "secondsSinceEpoch"), new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.SECONDS, "secondsSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "secondsSinceEpoch");
        assertEquals(column.getType(), BIGINT);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.MILLISECONDS, "millisSinceEpoch"),
                        new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.SECONDS, "secondsSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "secondsSinceEpoch");
        assertEquals(column.getType(), BIGINT);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());

        testSchema = new Schema.SchemaBuilder()
                .addTime(new TimeGranularitySpec(FieldSpec.DataType.INT, TimeUnit.DAYS, "daysSinceEpoch"),
                        new TimeGranularitySpec(FieldSpec.DataType.LONG, TimeUnit.SECONDS, "secondsSinceEpoch"))
                .build();
        pinotColumns = PinotColumnUtils.getPinotColumnsForPinotSchema(testSchema, pinotConfig.isInferDateTypeInSchema(), pinotConfig.isInferTimestampTypeInSchema());
        column = pinotColumns.get(0);
        assertEquals(column.getName(), "secondsSinceEpoch");
        assertEquals(column.getType(), BIGINT);
        assertEquals(column.getComment(), FieldSpec.FieldType.TIME.name());
    }