Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FormatSQLTimestamp (0.33 sec)

  1. internal/s3select/parquet/reader.go

    		value = int64(val)
    		if logicalType := se.GetLogicalType(); logicalType != nil {
    			if logicalType.IsSetDATE() {
    				value = sql.FormatSQLTimestamp(time.Unix(60*60*24*int64(val), 0).UTC())
    			}
    		} else if se.GetConvertedType() == parquettypes.ConvertedType_DATE {
    			value = sql.FormatSQLTimestamp(time.Unix(60*60*24*int64(val), 0).UTC())
    		}
    	case int64:
    		value = val
    		if logicalType := se.GetLogicalType(); logicalType != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  2. internal/s3select/sql/timestampfuncs.go

    	for _, f := range tformats {
    		t, err = time.Parse(f, s)
    		if err == nil {
    			break
    		}
    	}
    	return
    }
    
    // FormatSQLTimestamp - returns the a string representation of the
    // timestamp as used in S3 Select
    func FormatSQLTimestamp(t time.Time) string {
    	_, zoneOffset := t.Zone()
    	hasZone := zoneOffset != 0
    	hasFracSecond := t.Nanosecond() != 0
    	hasSecond := t.Second() != 0
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  3. internal/s3select/sql/timestampfuncs_test.go

    		if err != nil {
    			t.Errorf("Case %d: Unexpected error: %v", i+1, err)
    			continue
    		}
    		if !tval.Equal(tc.t) {
    			t.Errorf("Case %d: Expected %v got %v", i+1, tc.t, tval)
    			continue
    		}
    
    		tstr := FormatSQLTimestamp(tc.t)
    		if tstr != tc.s {
    			t.Errorf("Case %d: Expected %s got %s", i+1, tc.s, tstr)
    			continue
    		}
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  4. internal/s3select/json/record.go

    	if b, ok := value.ToBool(); ok {
    		v = b
    	} else if f, ok := value.ToFloat(); ok {
    		v = f
    	} else if i, ok := value.ToInt(); ok {
    		v = i
    	} else if t, ok := value.ToTimestamp(); ok {
    		v = sql.FormatSQLTimestamp(t)
    	} else if s, ok := value.ToString(); ok {
    		v = s
    	} else if value.IsNull() {
    		v = nil
    	} else if value.IsMissing() {
    		return r, nil
    	} else if b, ok := value.ToBytes(); ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  5. internal/s3select/sql/value.go

    		}
    		return "false"
    	case string:
    		return x
    	case int64:
    		return strconv.FormatInt(x, 10)
    	case float64:
    		return strconv.FormatFloat(x, 'g', -1, 64)
    	case time.Time:
    		return FormatSQLTimestamp(x)
    	case []byte:
    		return string(x)
    	case []Value:
    		b, _ := json.Marshal(x)
    		return string(b)
    
    	default:
    		return "CSV serialization not implemented for this type"
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
Back to top