Skip to content

[Bug] Precision not set properly for IntervalDayToSecond literal #145

@lorenarosati

Description

@lorenarosati

When creating a literal of type IntervalDayToSecond with the NewLiteral() function, the final returned literal does not have the precision set to the correct precision.

This is because this should be taking the precision from val and setting it here, but it doesn't do that and the precision defaults to 0:

case *types.IntervalDayToSecond:
    return &ProtoLiteral{
        Value: v,
	Type: &types.IntervalDayType{
		Nullability: getNullability(nullable),
	},
    }, nil

While precision is optional for this type, if provided, it should still be set properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions