|  | 
| 1 | 1 | -- Automatically generated by SQLQueryTestSuite | 
| 2 |  | --- Number of queries: 84 | 
|  | 2 | +-- Number of queries: 100 | 
| 3 | 3 | 
 | 
| 4 | 4 | 
 | 
| 5 | 5 | -- !query | 
| @@ -677,3 +677,135 @@ select date_part(null, i) from t | 
| 677 | 677 | struct<date_part(NULL, t.`i`):double> | 
| 678 | 678 | -- !query output | 
| 679 | 679 | NULL | 
|  | 680 | + | 
|  | 681 | + | 
|  | 682 | +-- !query | 
|  | 683 | +select extract('millennium', c) from t | 
|  | 684 | +-- !query schema | 
|  | 685 | +struct<> | 
|  | 686 | +-- !query output | 
|  | 687 | +org.apache.spark.sql.AnalysisException | 
|  | 688 | +Literals of type 'millennium' are currently not supported for the string type.;; line 1 pos 7 | 
|  | 689 | + | 
|  | 690 | + | 
|  | 691 | +-- !query | 
|  | 692 | +select extract('century', c) from t | 
|  | 693 | +-- !query schema | 
|  | 694 | +struct<> | 
|  | 695 | +-- !query output | 
|  | 696 | +org.apache.spark.sql.AnalysisException | 
|  | 697 | +Literals of type 'century' are currently not supported for the string type.;; line 1 pos 7 | 
|  | 698 | + | 
|  | 699 | + | 
|  | 700 | +-- !query | 
|  | 701 | +select extract('decade', c) from t | 
|  | 702 | +-- !query schema | 
|  | 703 | +struct<> | 
|  | 704 | +-- !query output | 
|  | 705 | +org.apache.spark.sql.AnalysisException | 
|  | 706 | +Literals of type 'decade' are currently not supported for the string type.;; line 1 pos 7 | 
|  | 707 | + | 
|  | 708 | + | 
|  | 709 | +-- !query | 
|  | 710 | +select extract('year', c) from t | 
|  | 711 | +-- !query schema | 
|  | 712 | +struct<extract('year' FROM t.`c`):int> | 
|  | 713 | +-- !query output | 
|  | 714 | +2011 | 
|  | 715 | + | 
|  | 716 | + | 
|  | 717 | +-- !query | 
|  | 718 | +select extract('quarter', c) from t | 
|  | 719 | +-- !query schema | 
|  | 720 | +struct<extract('quarter' FROM t.`c`):int> | 
|  | 721 | +-- !query output | 
|  | 722 | +2 | 
|  | 723 | + | 
|  | 724 | + | 
|  | 725 | +-- !query | 
|  | 726 | +select extract('month', c) from t | 
|  | 727 | +-- !query schema | 
|  | 728 | +struct<extract('month' FROM t.`c`):int> | 
|  | 729 | +-- !query output | 
|  | 730 | +5 | 
|  | 731 | + | 
|  | 732 | + | 
|  | 733 | +-- !query | 
|  | 734 | +select extract('week', c) from t | 
|  | 735 | +-- !query schema | 
|  | 736 | +struct<extract('week' FROM t.`c`):int> | 
|  | 737 | +-- !query output | 
|  | 738 | +18 | 
|  | 739 | + | 
|  | 740 | + | 
|  | 741 | +-- !query | 
|  | 742 | +select extract('day', c) from t | 
|  | 743 | +-- !query schema | 
|  | 744 | +struct<extract('day' FROM t.`c`):int> | 
|  | 745 | +-- !query output | 
|  | 746 | +6 | 
|  | 747 | + | 
|  | 748 | + | 
|  | 749 | +-- !query | 
|  | 750 | +select extract('days', c) from t | 
|  | 751 | +-- !query schema | 
|  | 752 | +struct<extract('days' FROM t.`c`):int> | 
|  | 753 | +-- !query output | 
|  | 754 | +6 | 
|  | 755 | + | 
|  | 756 | + | 
|  | 757 | +-- !query | 
|  | 758 | +select extract('dayofweek', c) from t | 
|  | 759 | +-- !query schema | 
|  | 760 | +struct<extract('dayofweek' FROM t.`c`):int> | 
|  | 761 | +-- !query output | 
|  | 762 | +6 | 
|  | 763 | + | 
|  | 764 | + | 
|  | 765 | +-- !query | 
|  | 766 | +select extract('dow', c) from t | 
|  | 767 | +-- !query schema | 
|  | 768 | +struct<extract('dow' FROM t.`c`):int> | 
|  | 769 | +-- !query output | 
|  | 770 | +6 | 
|  | 771 | + | 
|  | 772 | + | 
|  | 773 | +-- !query | 
|  | 774 | +select extract('isodow', c) from t | 
|  | 775 | +-- !query schema | 
|  | 776 | +struct<> | 
|  | 777 | +-- !query output | 
|  | 778 | +org.apache.spark.sql.AnalysisException | 
|  | 779 | +Literals of type 'isodow' are currently not supported for the string type.;; line 1 pos 7 | 
|  | 780 | + | 
|  | 781 | + | 
|  | 782 | +-- !query | 
|  | 783 | +select extract('doy', c) from t | 
|  | 784 | +-- !query schema | 
|  | 785 | +struct<extract('doy' FROM t.`c`):int> | 
|  | 786 | +-- !query output | 
|  | 787 | +126 | 
|  | 788 | + | 
|  | 789 | + | 
|  | 790 | +-- !query | 
|  | 791 | +select extract('hour', c) from t | 
|  | 792 | +-- !query schema | 
|  | 793 | +struct<extract('hour' FROM t.`c`):int> | 
|  | 794 | +-- !query output | 
|  | 795 | +7 | 
|  | 796 | + | 
|  | 797 | + | 
|  | 798 | +-- !query | 
|  | 799 | +select extract('minute', c) from t | 
|  | 800 | +-- !query schema | 
|  | 801 | +struct<extract('minute' FROM t.`c`):int> | 
|  | 802 | +-- !query output | 
|  | 803 | +8 | 
|  | 804 | + | 
|  | 805 | + | 
|  | 806 | +-- !query | 
|  | 807 | +select extract('second', c) from t | 
|  | 808 | +-- !query schema | 
|  | 809 | +struct<extract('second' FROM t.`c`):decimal(8,6)> | 
|  | 810 | +-- !query output | 
|  | 811 | +9.123456 | 
0 commit comments