diff --git a/framework/resources/Datasources/table_schema/bigint.csvh b/framework/resources/Datasources/table_schema/bigint.csvh new file mode 100644 index 000000000..11a759aec --- /dev/null +++ b/framework/resources/Datasources/table_schema/bigint.csvh @@ -0,0 +1,6 @@ +id,bigint_col,varchar_bigint_col +1,-9223372036854775808,-9223372036854775808 +2,-17,-17 +3,0,0 +4,15,15 +5,9223372036854775807,9223372036854775807 diff --git a/framework/resources/Datasources/table_schema/boolean.csvh b/framework/resources/Datasources/table_schema/boolean.csvh new file mode 100644 index 000000000..e49b658b2 --- /dev/null +++ b/framework/resources/Datasources/table_schema/boolean.csvh @@ -0,0 +1,21 @@ +id,boolean_col,varchar_boolean_col +1,true,true +2,1,1 +3,t,t +4,y,y +5,yes,yes +6,on,on +7,false,false +8,0,0 +9,f,f +10,n,n +11,no,no +12,off,off +13,a,true +14,-,true +15,!,true +16,`,true +17,7,true +18,@,true +19,^,true +20,*,true diff --git a/framework/resources/Datasources/table_schema/date.csvh b/framework/resources/Datasources/table_schema/date.csvh new file mode 100644 index 000000000..f4794b6b8 --- /dev/null +++ b/framework/resources/Datasources/table_schema/date.csvh @@ -0,0 +1,8 @@ +id,date_col,varchar_date_col +1,1-12-31,1-12-31 +2,1-1-1,1-1-1 +3,999-2-3,999-2-3 +4,1969-1-1,1969-1-1 +5,1970-01-01,1970-01-01 +6,2019-02-19,2019-02-19 +7,9999-12-31,9999-12-31 diff --git a/framework/resources/Datasources/table_schema/date_custom_format.csvh b/framework/resources/Datasources/table_schema/date_custom_format.csvh new file mode 100644 index 000000000..a502ab4ae --- /dev/null +++ b/framework/resources/Datasources/table_schema/date_custom_format.csvh @@ -0,0 +1,9 @@ +id,date_format_col,varchar_date_format_col +1,22+Sep 10,22+Sep 10 +2,11+Oct 01,11+Oct 01 +3,99+Sep 10,99+Sep 10 +4,22+Nov 22,22+Nov 22 +5,11+Jan 30,11+Jan 30 +6,10+Dec 42,10+Dec 42 +7,01+May 31,01+May 31 +8,00+Aug 67,00+Aug 67 diff --git a/framework/resources/Datasources/table_schema/decimal.csvh b/framework/resources/Datasources/table_schema/decimal.csvh new file mode 100644 index 000000000..4d86fd391 --- /dev/null +++ b/framework/resources/Datasources/table_schema/decimal.csvh @@ -0,0 +1,12 @@ +id,decimal_5_5,varchar_decimal_5_5,decimal_5_3,varchar_decimal_5_3,decimal_5_0,varchar_decimal_5_0 +1,-0.99999,-0.99999,-99.999,-99.999,-99999,-99999 +2,-0.99999,-0.99999,-99.999,-99.999,-99999.0,-99999.0 +3,-0.1,-0.1,-0.1,-0.1,-0.0,-0.0 +4,0,0.0,0,0,0,0 +5,-0,-0.0,-0,-0,-0,-0 +6,0.1,0.1,0.1,0.1,0.0,0.0 +7,+0.1,+0.1,+0.1,+0.1,+0.0,+0.0 +8,0.99999,0.99999,99.999,99.999,99999,99999 +9,0.99999,0.99999,99.999,99.999,99999.0,99999.0 +10,+0.99999,+0.99999,+99.999,+99.999,+99999,+99999 +11,+0.99999,+0.99999,+99.999,+99.999,+99999.0,+99999.0 diff --git a/framework/resources/Datasources/table_schema/double.csvh b/framework/resources/Datasources/table_schema/double.csvh new file mode 100644 index 000000000..5b8ca7579 --- /dev/null +++ b/framework/resources/Datasources/table_schema/double.csvh @@ -0,0 +1,47 @@ +id,double_col,varchar_double_col +1,NaN,NaN +2,+NaN,+NaN +3,-NaN,-NaN +4, NaN, NaN +5,NaN ,NaN +6,NaN,NaN +7,NaN,NaN +8,Infinity,Infinity +9,+Infinity,+Infinity +10,-Infinity,-Infinity +11, Infinity ,Infinity +12,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792 +13,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792D,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792D +14,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792F,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792F +15,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791 +16,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791D,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791D +17,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791F,-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791F +18,-1.7976931348623157e308D,-1.7976931348623157e308D +19,-1.7976931348623157e308F,-1.7976931348623157e308F +20,-1.7976931348623157e308,-1.7976931348623157e308 +21,-1.7976931348623158e308D,-1.7976931348623158e308D +22,-1.7976931348623158e308F,-1.7976931348623158e308F +23,-1.7976931348623158e308,-1.7976931348623158e308 +24,0,0 +25,0.0,0.0 +26,0.0f,0.0f +27,0.0D,0.0D +28,0.0F,0.0F +29,1.7976931348623157e308D,1.7976931348623157e308D +30,1.7976931348623157e308F,1.7976931348623157e308F +31,1.7976931348623157e308,1.7976931348623157e308 +32,1.7976931348623158e308D,1.7976931348623158e308D +33,1.7976931348623158e308F,1.7976931348623158e308F +34,1.7976931348623158e308,1.7976931348623158e308 +35,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792 +36,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792D,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792D +37,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792F,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792F +38,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791 +39,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791D,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791D +40,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791F,179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791F +41,-1.7976931348623158e308,-1.7976931348623158e308 +42,-1.7976931348623157e308,-1.7976931348623157e308 +43,1.7976931348623157e308,1.7976931348623157e308 +44,1.7976931348623158e308,1.7976931348623158e308 +45,4.9e-324d,4.9e-324d +46,4.9e-324,4.9e-324 diff --git a/framework/resources/Datasources/table_schema/double_1.csvh b/framework/resources/Datasources/table_schema/double_1.csvh new file mode 100644 index 000000000..816245fb7 --- /dev/null +++ b/framework/resources/Datasources/table_schema/double_1.csvh @@ -0,0 +1,6 @@ +double_col +1 +2 +3 +4 +5 diff --git a/framework/resources/Datasources/table_schema/double_2.csvh b/framework/resources/Datasources/table_schema/double_2.csvh new file mode 100644 index 000000000..a34f183f0 --- /dev/null +++ b/framework/resources/Datasources/table_schema/double_2.csvh @@ -0,0 +1,6 @@ +double_col +5 +6 +7.7 +8 +9 diff --git a/framework/resources/Datasources/table_schema/float.csvh b/framework/resources/Datasources/table_schema/float.csvh new file mode 100644 index 000000000..f9249d828 --- /dev/null +++ b/framework/resources/Datasources/table_schema/float.csvh @@ -0,0 +1,24 @@ +id,float_col,varchar_float_col +1,0.00000000000000000000000000000000000000000000190,0.00000000000000000000000000000000000000000000190 +2,0.00000000000000000000000000000000000000000000090,0.00000000000000000000000000000000000000000000090 +3,0.00000000000000000000000000000000000000000000140,0.00000000000000000000000000000000000000000000140 +4,0.00000000000000000000000000000000000000000000150,0.00000000000000000000000000000000000000000000150 +5,0.00000000000000000000000000000000000000000000130,0.00000000000000000000000000000000000000000000130 +6,0.000000000000000000000000000000000000000000000140,0.000000000000000000000000000000000000000000000140 +7,0.0000000000000000000000000000000000000000000000140,0.0000000000000000000000000000000000000000000000140 +8,0.00000000000000000000000000000000000000000000000140,0.00000000000000000000000000000000000000000000000140 +9,0,0 +10,0.0,0.0 +11,0.0f,0.0f +12,0.0D,0.0D +13,0.0F,0.0F +14,-0.00000000000000000000000000000000000000000000140,-0.00000000000000000000000000000000000000000000140 +15,-0.00000000000000000000000000000000000000000000150,-0.00000000000000000000000000000000000000000000150 +16,-0.00000000000000000000000000000000000000000000130,-0.00000000000000000000000000000000000000000000130 +17,-0.000000000000000000000000000000000000000000000140,-0.000000000000000000000000000000000000000000000140 +18,-0.0000000000000000000000000000000000000000000000140,-0.0000000000000000000000000000000000000000000000140 +19,-0.00000000000000000000000000000000000000000000000140,-0.00000000000000000000000000000000000000000000000140 +20,-3.4028235E38,-3.4028235E38 +21,3.4028235e38,3.4028235e38 +22,1.40e-45f,1.40e-45f +23,1.40e-45,1.40e-45 diff --git a/framework/resources/Datasources/table_schema/integer.csvh b/framework/resources/Datasources/table_schema/integer.csvh new file mode 100644 index 000000000..04629be2e --- /dev/null +++ b/framework/resources/Datasources/table_schema/integer.csvh @@ -0,0 +1,6 @@ +id,integer_col,varchar_integer_col +1,-2147483648,-2147483648 +2,-15,-15 +3,0,0 +4,15,15 +5,2147483647,2147483647 diff --git a/framework/resources/Datasources/table_schema/interval.csvh b/framework/resources/Datasources/table_schema/interval.csvh new file mode 100644 index 000000000..51ea38a1f --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval.csvh @@ -0,0 +1,64 @@ +id,interval_col,varchar_interval_col +1,P0Y,P0Y +2,P0Y0M,P0Y0M +3,P0Y0M0D,P0Y0M0D +4,P0Y0M0DT0H,P0Y0M0DT0H +5,P0Y0M0DT0H0M,P0Y0M0DT0H0M +6,P0Y0M0DT0H0M0S,P0Y0M0DT0H0M0S +7,P0M,P0M +8,P0M0D,P0M0D +9,P0M0DT0H,P0M0DT0H +10,P0M0DT0H0M,P0M0DT0H0M +11,P0M0DT0H0M0S,P0M0DT0H0M0S +12,P0D,P0D +13,P0DT0H,P0DT0H +14,P0DT0H0M,P0DT0H0M +15,P0DT0H0M0S,P0DT0H0M0S +16,PT0H,PT0H +17,PT0H0M,PT0H0M +18,PT0H0M0S,PT0H0M0S +19,PT0M,PT0M +20,PT0M0S,PT0M0S +21,PT0S,PT0S +22,P1Y,P1Y +23,P1Y1M,P1Y1M +24,P1Y1M1D,P1Y1M1D +25,P1Y1M1DT1H,P1Y1M1DT1H +26,P1Y1M1DT1H1M,P1Y1M1DT1H1M +27,P1Y1M1DT1H1M1S,P1Y1M1DT1H1M1S +28,P1M,P1M +29,P1M1D,P1M1D +30,P1M1DT1H,P1M1DT1H +31,P1M1DT1H1M,P1M1DT1H1M +32,P1M1DT1H1M1S,P1M1DT1H1M1S +33,P1D,P1D +34,P1DT1H,P1DT1H +35,P1DT1H1M,P1DT1H1M +36,P1DT1H1M1S,P1DT1H1M1S +37,PT1H,PT1H +38,PT1H1M,PT1H1M +39,PT1H1M1S,PT1H1M1S +40,PT1M,PT1M +41,PT1M1S,PT1M1S +42,PT1S,PT1S +43,P9999Y,P9999Y +44,P9999Y12M,P9999Y12M +45,P9999Y12M28D,P9999Y12M28D +46,P9999Y12M28DT23H,P9999Y12M28DT23H +47,P9999Y12M28DT23H59M,P9999Y12M28DT23H59M +48,P9999Y12M28DT23H59M59S,P9999Y12M28DT23H59M59S +49,P12M,P12M +50,P12M28D,P12M28D +51,P12M28DT23H,P12M28DT23H +52,P12M28DT23H59M,P12M28DT23H59M +53,P12M28DT23H59M59S,P12M28DT23H59M59S +54,P28D,P28D +55,P28DT23H,P28DT23H +56,P28DT23H59M,P28DT23H59M +57,P28DT23H59M59S,P28DT23H59M59S +58,PT23H,PT23H +59,PT23H59M,PT23H59M +60,PT23H59M59S,PT23H59M59S +61,PT59M,PT59M +62,PT59M59S,PT59M59S +63,PT59S,PT59S diff --git a/framework/resources/Datasources/table_schema/interval_day.csvh b/framework/resources/Datasources/table_schema/interval_day.csvh new file mode 100644 index 000000000..2960306bf --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_day.csvh @@ -0,0 +1,22 @@ +id,interval_col,varchar_interval_col +1,P0D,P0D +2,P1D,P1D +3,P10D,P10D +4,P200D,P200D +5,P7777D,P7777D +6,P9999D,P9999D +7,P99999D,P99999D +8,P-0D,P-0D +9,P-1D,P-1D +10,P-10D,P-10D +11,P-200D,P-200D +12,P-7777D,P-7777D +13,P-9999D,P-9999D +14,P-99999D,P-99999D +15,P+0D,P+0D +16,P+1D,P+1D +17,P+10D,P+10D +18,P+200D,P+200D +19,P+7777D,P+7777D +20,P+9999D,P+9999D +21,P+99999D,P+99999D diff --git a/framework/resources/Datasources/table_schema/interval_hour.csvh b/framework/resources/Datasources/table_schema/interval_hour.csvh new file mode 100644 index 000000000..ffeee6e01 --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_hour.csvh @@ -0,0 +1,28 @@ +id,interval_col,varchar_interval_col +1,PT0H,PT0H +2,PT1H,PT1H +3,PT12H,PT12H +4,PT23H,PT23H +5,PT24H,PT24H +6,PT200H,PT200H +7,PT7777H,PT7777H +8,PT9999H,PT9999H +9,PT99999H,PT99999H +10,PT-0H,PT-0H +11,PT-1H,PT-1H +12,PT-12H,PT-12H +13,PT-23H,PT-23H +14,PT-24H,PT-24H +15,PT-200H,PT-200H +16,PT-7777H,PT-7777H +17,PT-9999H,PT-9999H +18,PT-99999H,PT-99999H +19,PT+0H,PT+0H +20,PT+1H,PT+1H +21,PT+12H,PT+12H +22,PT+23H,PT+23H +23,PT+24H,PT+24H +24,PT+200H,PT+200H +25,PT+7777H,PT+7777H +26,PT+9999H,PT+9999H +27,PT+99999H,PT+99999H diff --git a/framework/resources/Datasources/table_schema/interval_minute.csvh b/framework/resources/Datasources/table_schema/interval_minute.csvh new file mode 100644 index 000000000..272ad8447 --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_minute.csvh @@ -0,0 +1,28 @@ +id,interval_col,varchar_interval_col +1,PT0M,PT0M +2,PT1M,PT1M +3,PT30M,PT30M +4,PT59M,PT59M +5,PT60M,PT60M +6,PT200M,PT200M +7,PT7777M,PT7777M +8,PT9999M,PT9999M +9,PT99999M,PT99999M +10,PT-0M,PT-0M +11,PT-1M,PT-1M +12,PT-30M,PT-30M +13,PT-59M,PT-59M +14,PT-60M,PT-60M +15,PT-200M,PT-200M +16,PT-7777M,PT-7777M +17,PT-9999M,PT-9999M +18,PT-99999M,PT-99999M +19,PT+0M,PT+0M +20,PT+1M,PT+1M +21,PT+30M,PT+30M +22,PT+59M,PT+59M +23,PT+60M,PT+60M +24,PT+200M,PT+200M +25,PT+7777M,PT+7777M +26,PT+9999M,PT+9999M +27,PT+99999M,PT+99999M diff --git a/framework/resources/Datasources/table_schema/interval_month.csvh b/framework/resources/Datasources/table_schema/interval_month.csvh new file mode 100644 index 000000000..55d22a484 --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_month.csvh @@ -0,0 +1,22 @@ +id,interval_col,varchar_interval_col +1,P0M,P0M +2,P1M,P1M +3,P10M,P10M +4,P200M,P200M +5,P7777M,P7777M +6,P9999M,P9999M +7,P99999M,P99999M +8,P-0M,P-0M +9,P-1M,P-1M +10,P-10M,P-10M +11,P-200M,P-200M +12,P-7777M,P-7777M +13,P-9999M,P-9999M +14,P-99999M,P-99999M +15,P+0M,P+0M +16,P+1M,P+1M +17,P+10M,P+10M +18,P+200M,P+200M +19,P+7777M,P+7777M +20,P+9999M,P+9999M +21,P+99999M,P+99999M diff --git a/framework/resources/Datasources/table_schema/interval_second.csvh b/framework/resources/Datasources/table_schema/interval_second.csvh new file mode 100644 index 000000000..9852d6455 --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_second.csvh @@ -0,0 +1,28 @@ +id,interval_col,varchar_interval_col +1,PT0S,PT0S +2,PT1S,PT1S +3,PT30S,PT30S +4,PT59S,PT59S +5,PT60S,PT60S +6,PT200S,PT200S +7,PT7777S,PT7777S +8,PT9999S,PT9999S +9,PT99999S,PT99999S +10,PT-0S,PT-0S +11,PT-1S,PT-1S +12,PT-30S,PT-30S +13,PT-59S,PT-59S +14,PT-60S,PT-60S +15,PT-200S,PT-200S +16,PT-7777S,PT-7777S +17,PT-9999S,PT-9999S +18,PT-99999S,PT-99999S +19,PT+0S,PT+0S +20,PT+1S,PT+1S +21,PT+30S,PT+30S +22,PT+59S,PT+59S +23,PT+60S,PT+60S +24,PT+200S,PT+200S +25,PT+7777S,PT+7777S +26,PT+9999S,PT+9999S +27,PT+99999S,PT+99999S diff --git a/framework/resources/Datasources/table_schema/interval_year.csvh b/framework/resources/Datasources/table_schema/interval_year.csvh new file mode 100644 index 000000000..a0105237b --- /dev/null +++ b/framework/resources/Datasources/table_schema/interval_year.csvh @@ -0,0 +1,22 @@ +id,interval_col,varchar_interval_col +1,P0Y,P0Y +2,P1Y,P1Y +3,P10Y,P10Y +4,P200Y,P200Y +5,P7777Y,P7777Y +6,P9999Y,P9999Y +7,P99999Y,P99999Y +8,P-0Y,P-0Y +9,P-1Y,P-1Y +10,P-10Y,P-10Y +11,P-200Y,P-200Y +12,P-7777Y,P-7777Y +13,P-9999Y,P-9999Y +14,P-99999Y,P-99999Y +15,P+0Y,P+0Y +16,P+1Y,P+1Y +17,P+10Y,P+10Y +18,P+200Y,P+200Y +19,P+7777Y,P+7777Y +20,P+9999Y,P+9999Y +21,P+99999Y,P+99999Y diff --git a/framework/resources/Datasources/table_schema/nullable_double.csvh b/framework/resources/Datasources/table_schema/nullable_double.csvh new file mode 100644 index 000000000..44d015fab --- /dev/null +++ b/framework/resources/Datasources/table_schema/nullable_double.csvh @@ -0,0 +1,6 @@ +nullable_double_col +1 +2 + +4.3 +5 diff --git a/framework/resources/Datasources/table_schema/time.csvh b/framework/resources/Datasources/table_schema/time.csvh new file mode 100644 index 000000000..ff766b600 --- /dev/null +++ b/framework/resources/Datasources/table_schema/time.csvh @@ -0,0 +1,17 @@ +id,time_col,varchar_time_col +1,15:20:30,15:20:30 +2,0:0:0,0:0:0 +3,23:59:59,23:59:59 +4,1:1:1,1:1:1 +5,01:01:01,01:01:01 +6,01:01:01,01:01:001 +7,01:01:01,01:001:001 +8,01:01:01,001:001:001 +9,1:1:1.1,1:1:1.1 +10,1:1:1.0,1:1:1.0 +11,1:1:10,1:1:10 +12,1:1:1.10,1:1:1.10 +13,1:1:1.999,1:1:1.999 +14,1:1:1.9999,1:1:1.9999 +15,1:1:1.999999,1:1:1.999999 +16,1:1:1.998999,1:1:1.998999 diff --git a/framework/resources/Datasources/table_schema/time_custom_format.csvh b/framework/resources/Datasources/table_schema/time_custom_format.csvh new file mode 100644 index 000000000..c930820f7 --- /dev/null +++ b/framework/resources/Datasources/table_schema/time_custom_format.csvh @@ -0,0 +1,11 @@ +id,time_format_col,varchar_time_format_col +1,01:2_00-099 PM,01:2_00-099 PM +2,11:0_59-990 AM,11:0_59-990 AM +3,12:02_1-909 PM,12:02_1-909 PM +4,03:10_01-0 am,03:10_01-0 am +5,7:59_10-9 AM,7:59_10-9 AM +6,01:36_22-111 am,01:36_22-111 am +7,3:12_50-999 PM,3:12_50-999 PM +8,4:29_1-564 pm,4:29_1-564 pm +9,3:2_2-543 pm,3:2_2-543 pm +10,10:1_12-121 PM,10:1_12-121 PM diff --git a/framework/resources/Datasources/table_schema/timestamp.csvh b/framework/resources/Datasources/table_schema/timestamp.csvh new file mode 100644 index 000000000..91805ca0e --- /dev/null +++ b/framework/resources/Datasources/table_schema/timestamp.csvh @@ -0,0 +1,6 @@ +id,timestamp_col,varchar_timestamp_col +1,1970-01-01T01:00:00-00:00,1970-01-01 00:00:00 +2,1970-01-01T01:00:00-00:00,1970-01-01 01:00:00 +3,2019-02-19T14:18:11-05:00,2019-02-19 14:18:11 +4,9999-12-31T23:59:59-23:00,9999-12-31 23:59:59 +5,1970-01-01T01:00:00+00:00,1970-01-01 01:00:00 diff --git a/framework/resources/Datasources/table_schema/varchar.csvh b/framework/resources/Datasources/table_schema/varchar.csvh new file mode 100644 index 000000000..ce64d2916 --- /dev/null +++ b/framework/resources/Datasources/table_schema/varchar.csvh @@ -0,0 +1,13 @@ +id,varchar_col,varchar_col2 +1,line1,line1 +2,line2,line2 +3,|_|,|_| +4,|__|,|__| +5,',' +6,;,; +7,.,. +8,`,` +9,``,`` +10,;select,;select +11,';select,';select +12,`;select,`;select diff --git a/framework/resources/Functional/table_schema/data/01_integer.e_tsv b/framework/resources/Functional/table_schema/data/01_integer.e_tsv new file mode 100644 index 000000000..9538c0744 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/01_integer.e_tsv @@ -0,0 +1,5 @@ +-2147483648 INTEGER -2147483648 +-15 INTEGER -15 +0 INTEGER 0 +15 INTEGER 15 +2147483647 INTEGER 2147483647 diff --git a/framework/resources/Functional/table_schema/data/01_integer.sql b/framework/resources/Functional/table_schema/data/01_integer.sql new file mode 100644 index 000000000..2d1f44a8b --- /dev/null +++ b/framework/resources/Functional/table_schema/data/01_integer.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + integer_col INTEGER, + varchar_integer_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/integer`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + integer_col, + sqlTypeOf(integer_col), + CAST(varchar_integer_col as INT) +FROM dfs.drillTestDir.`table_schema/integer`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/02_bigint.e_tsv b/framework/resources/Functional/table_schema/data/02_bigint.e_tsv new file mode 100644 index 000000000..9a18cdca2 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/02_bigint.e_tsv @@ -0,0 +1,5 @@ +-9223372036854775808 BIGINT -9223372036854775808 +-17 BIGINT -17 +0 BIGINT 0 +15 BIGINT 15 +9223372036854775807 BIGINT 9223372036854775807 diff --git a/framework/resources/Functional/table_schema/data/02_bigint.sql b/framework/resources/Functional/table_schema/data/02_bigint.sql new file mode 100644 index 000000000..00d9ccea7 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/02_bigint.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + bigint_col BIGINT, + varchar_bigint_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/bigint`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + bigint_col, + sqlTypeOf(bigint_col), + CAST(varchar_bigint_col as BIGINT) +FROM dfs.drillTestDir.`table_schema/bigint`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/03_double.e_tsv b/framework/resources/Functional/table_schema/data/03_double.e_tsv new file mode 100644 index 000000000..310a2a943 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/03_double.e_tsv @@ -0,0 +1,46 @@ +NaN DOUBLE NaN +NaN DOUBLE NaN +NaN DOUBLE NaN +NaN DOUBLE NaN +NaN DOUBLE NaN +NaN DOUBLE NaN +NaN DOUBLE NaN +Infinity DOUBLE Infinity +Infinity DOUBLE Infinity +-Infinity DOUBLE -Infinity +Infinity DOUBLE Infinity +-Infinity DOUBLE -Infinity +-Infinity DOUBLE -Infinity +-Infinity DOUBLE -Infinity +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +0.0 DOUBLE 0.0 +0.0 DOUBLE 0.0 +0.0 DOUBLE 0.0 +0.0 DOUBLE 0.0 +0.0 DOUBLE 0.0 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +Infinity DOUBLE Infinity +Infinity DOUBLE Infinity +Infinity DOUBLE Infinity +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +-1.7976931348623157E308 DOUBLE -1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +1.7976931348623157E308 DOUBLE 1.7976931348623157E308 +4.9E-324 DOUBLE 4.9E-324 +4.9E-324 DOUBLE 4.9E-324 diff --git a/framework/resources/Functional/table_schema/data/03_double.sql b/framework/resources/Functional/table_schema/data/03_double.sql new file mode 100644 index 000000000..981b0e618 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/03_double.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + double_col DOUBLE, + varchar_double_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/double`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + double_col, + sqlTypeOf(double_col), + CAST(varchar_double_col as DOUBLE) +FROM dfs.drillTestDir.`table_schema/double`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/04_double_2_files.e_tsv b/framework/resources/Functional/table_schema/data/04_double_2_files.e_tsv new file mode 100644 index 000000000..5af254b91 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/04_double_2_files.e_tsv @@ -0,0 +1,10 @@ +1.0 DOUBLE null +2.0 DOUBLE null +3.0 DOUBLE null +4.0 DOUBLE null +5.0 DOUBLE null +5.0 DOUBLE null +6.0 DOUBLE null +7.7 DOUBLE null +8.0 DOUBLE null +9.0 DOUBLE null diff --git a/framework/resources/Functional/table_schema/data/04_double_2_files.sql b/framework/resources/Functional/table_schema/data/04_double_2_files.sql new file mode 100644 index 000000000..8db761002 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/04_double_2_files.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + double_col DOUBLE, + varchar_double_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/double_2_files`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + double_col, + sqlTypeOf(double_col), + CAST(varchar_double_col as DOUBLE) +FROM dfs.drillTestDir.`table_schema/double_2_files`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.e_tsv b/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.e_tsv new file mode 100644 index 000000000..eef68ae88 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.e_tsv @@ -0,0 +1,5 @@ +1.0 DOUBLE NULLABLE +2.0 DOUBLE NULLABLE +null DOUBLE NULLABLE +4.3 DOUBLE NULLABLE +5.0 DOUBLE NULLABLE diff --git a/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.sql b/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.sql new file mode 100644 index 000000000..2ee194057 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/05_double_nullable_file_nullable_schema.sql @@ -0,0 +1,11 @@ +CREATE OR REPLACE SCHEMA ( + nullable_double_col DOUBLE +) FOR TABLE dfs.drillTestDir.`table_schema/nullable_double_5`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM dfs.drillTestDir.`table_schema/nullable_double_5`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.e_tsv b/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.e_tsv new file mode 100644 index 000000000..5891b772f --- /dev/null +++ b/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.e_tsv @@ -0,0 +1,5 @@ +1.0 DOUBLE NOT NULL +2.0 DOUBLE NOT NULL +0.0 DOUBLE NOT NULL +4.3 DOUBLE NOT NULL +5.0 DOUBLE NOT NULL diff --git a/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.sql b/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.sql new file mode 100644 index 000000000..5cc90fc3a --- /dev/null +++ b/framework/resources/Functional/table_schema/data/06_double_nullable_file_not_null_schema.sql @@ -0,0 +1,11 @@ +CREATE OR REPLACE SCHEMA ( + nullable_double_col DOUBLE NOT NULL +) FOR TABLE dfs.drillTestDir.`table_schema/nullable_double_6`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM dfs.drillTestDir.`table_schema/nullable_double_6`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/07_double_default.e_tsv b/framework/resources/Functional/table_schema/data/07_double_default.e_tsv new file mode 100644 index 000000000..8489e6b94 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/07_double_default.e_tsv @@ -0,0 +1,5 @@ +1.0 DOUBLE NOT NULL +2.0 DOUBLE NOT NULL +1.0 DOUBLE NOT NULL +4.3 DOUBLE NOT NULL +5.0 DOUBLE NOT NULL diff --git a/framework/resources/Functional/table_schema/data/07_double_default.sql b/framework/resources/Functional/table_schema/data/07_double_default.sql new file mode 100644 index 000000000..3e44d9aa5 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/07_double_default.sql @@ -0,0 +1,11 @@ +CREATE OR REPLACE SCHEMA ( + nullable_double_col DOUBLE NOT NULL default '1.0' +) FOR TABLE dfs.drillTestDir.`table_schema/nullable_double_7`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM dfs.drillTestDir.`table_schema/nullable_double_7`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/08_float.e_tsv b/framework/resources/Functional/table_schema/data/08_float.e_tsv new file mode 100644 index 000000000..a83ac846c --- /dev/null +++ b/framework/resources/Functional/table_schema/data/08_float.e_tsv @@ -0,0 +1,23 @@ +1.4E-45 FLOAT 1.4E-45 +1.4E-45 FLOAT 1.4E-45 +1.4E-45 FLOAT 1.4E-45 +1.4E-45 FLOAT 1.4E-45 +1.4E-45 FLOAT 1.4E-45 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +0.0 FLOAT 0.0 +-1.4E-45 FLOAT -1.4E-45 +-1.4E-45 FLOAT -1.4E-45 +-1.4E-45 FLOAT -1.4E-45 +-0.0 FLOAT -0.0 +-0.0 FLOAT -0.0 +-0.0 FLOAT -0.0 +-3.4028235E38 FLOAT -3.4028235E38 +3.4028235E38 FLOAT 3.4028235E38 +1.4E-45 FLOAT 1.4E-45 +1.4E-45 FLOAT 1.4E-45 diff --git a/framework/resources/Functional/table_schema/data/08_float.sql b/framework/resources/Functional/table_schema/data/08_float.sql new file mode 100644 index 000000000..060d8509c --- /dev/null +++ b/framework/resources/Functional/table_schema/data/08_float.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + float_col FLOAT, + varchar_float_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/float`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + float_col, + sqlTypeOf(float_col), + CAST(varchar_float_col as FLOAT) +FROM dfs.drillTestDir.`table_schema/float`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/09_decimal.e_tsv b/framework/resources/Functional/table_schema/data/09_decimal.e_tsv new file mode 100644 index 000000000..92a4f8298 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/09_decimal.e_tsv @@ -0,0 +1,11 @@ +-0.99999 DECIMAL(5, 5) -0.99999 -99.999 DECIMAL(5, 3) -99.999 -99999 DECIMAL(5, 0) -99999 +-0.99999 DECIMAL(5, 5) -0.99999 -99.999 DECIMAL(5, 3) -99.999 -99999 DECIMAL(5, 0) -99999 +-0.10000 DECIMAL(5, 5) -0.10000 -0.100 DECIMAL(5, 3) -0.100 0 DECIMAL(5, 0) 0 +0.00000 DECIMAL(5, 5) 0.00000 0.000 DECIMAL(5, 3) 0.000 0 DECIMAL(5, 0) 0 +0.00000 DECIMAL(5, 5) 0.00000 0.000 DECIMAL(5, 3) 0.000 0 DECIMAL(5, 0) 0 +0.10000 DECIMAL(5, 5) 0.10000 0.100 DECIMAL(5, 3) 0.100 0 DECIMAL(5, 0) 0 +0.10000 DECIMAL(5, 5) 0.10000 0.100 DECIMAL(5, 3) 0.100 0 DECIMAL(5, 0) 0 +0.99999 DECIMAL(5, 5) 0.99999 99.999 DECIMAL(5, 3) 99.999 99999 DECIMAL(5, 0) 99999 +0.99999 DECIMAL(5, 5) 0.99999 99.999 DECIMAL(5, 3) 99.999 99999 DECIMAL(5, 0) 99999 +0.99999 DECIMAL(5, 5) 0.99999 99.999 DECIMAL(5, 3) 99.999 99999 DECIMAL(5, 0) 99999 +0.99999 DECIMAL(5, 5) 0.99999 99.999 DECIMAL(5, 3) 99.999 99999 DECIMAL(5, 0) 99999 diff --git a/framework/resources/Functional/table_schema/data/09_decimal.sql b/framework/resources/Functional/table_schema/data/09_decimal.sql new file mode 100644 index 000000000..2591e1ed9 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/09_decimal.sql @@ -0,0 +1,22 @@ +CREATE OR REPLACE SCHEMA ( + decimal_5_5 DECIMAL(5,5), + varchar_decimal_5_5 VARCHAR, + decimal_5_3 DECIMAL(5,3), + varchar_decimal_5_3 VARCHAR, + decimal_5_0 DECIMAL(5,0), + varchar_decimal_5_0 VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/decimal`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + decimal_5_5, + sqlTypeOf(decimal_5_5), + CAST(varchar_decimal_5_5 as DECIMAL(5,5)), + decimal_5_3, + sqlTypeOf(decimal_5_3), + CAST(varchar_decimal_5_3 as DECIMAL(5,3)), + decimal_5_0, + sqlTypeOf(decimal_5_0), + CAST(varchar_decimal_5_0 as DECIMAL(5,0)) +FROM dfs.drillTestDir.`table_schema/decimal`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/10_boolean.e_tsv b/framework/resources/Functional/table_schema/data/10_boolean.e_tsv new file mode 100644 index 000000000..d40f8938a --- /dev/null +++ b/framework/resources/Functional/table_schema/data/10_boolean.e_tsv @@ -0,0 +1,20 @@ +true BOOLEAN true +true BOOLEAN true +true BOOLEAN true +true BOOLEAN true +true BOOLEAN true +true BOOLEAN true +false BOOLEAN false +false BOOLEAN false +false BOOLEAN false +false BOOLEAN false +false BOOLEAN false +false BOOLEAN false +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true +false BOOLEAN true diff --git a/framework/resources/Functional/table_schema/data/10_boolean.sql b/framework/resources/Functional/table_schema/data/10_boolean.sql new file mode 100644 index 000000000..489b862cc --- /dev/null +++ b/framework/resources/Functional/table_schema/data/10_boolean.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + boolean_col BOOLEAN, + varchar_boolean_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/boolean`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + boolean_col, + sqlTypeOf(boolean_col), + CAST(varchar_boolean_col as BOOLEAN) +FROM dfs.drillTestDir.`table_schema/boolean`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/11_varchar.e_tsv b/framework/resources/Functional/table_schema/data/11_varchar.e_tsv new file mode 100644 index 000000000..288fe9aba --- /dev/null +++ b/framework/resources/Functional/table_schema/data/11_varchar.e_tsv @@ -0,0 +1,12 @@ +line1 line1 +line2 line2 +|_| |_| +|__| |__| +' ' +; ; +. . +` ` +`` `` +;select ;select +';select ';select +`;select `;select diff --git a/framework/resources/Functional/table_schema/data/11_varchar.sql b/framework/resources/Functional/table_schema/data/11_varchar.sql new file mode 100644 index 000000000..81fbd45b8 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/11_varchar.sql @@ -0,0 +1,11 @@ +CREATE OR REPLACE SCHEMA ( + varchar_col VARCHAR, + varchar_col2 VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/varchar`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + varchar_col, + varchar_col2 +FROM dfs.drillTestDir.`table_schema/varchar`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/12_drill_strict_true.e_tsv b/framework/resources/Functional/table_schema/data/12_drill_strict_true.e_tsv new file mode 100644 index 000000000..8608a8ce4 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/12_drill_strict_true.e_tsv @@ -0,0 +1,12 @@ +line1 +line2 +|_| +|__| +' +; +. +` +`` +;select +';select +`;select diff --git a/framework/resources/Functional/table_schema/data/12_drill_strict_true.sql b/framework/resources/Functional/table_schema/data/12_drill_strict_true.sql new file mode 100644 index 000000000..4aaebc1c9 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/12_drill_strict_true.sql @@ -0,0 +1,10 @@ +CREATE OR REPLACE SCHEMA ( + varchar_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/varchar_12` +PROPERTIES ('drill.strict' = 'true'); +SET `store.table.use_schema_file` = true; +--@test +SELECT + * +FROM dfs.drillTestDir.`table_schema/varchar_12`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/13_drill_strict_false.e_tsv b/framework/resources/Functional/table_schema/data/13_drill_strict_false.e_tsv new file mode 100644 index 000000000..4eb30230b --- /dev/null +++ b/framework/resources/Functional/table_schema/data/13_drill_strict_false.e_tsv @@ -0,0 +1,12 @@ +line1 1 line1 +line2 2 line2 +|_| 3 |_| +|__| 4 |__| +' 5 ' +; 6 ; +. 7 . +` 8 ` +`` 9 `` +;select 10 ;select +';select 11 ';select +`;select 12 `;select diff --git a/framework/resources/Functional/table_schema/data/13_drill_strict_false.sql b/framework/resources/Functional/table_schema/data/13_drill_strict_false.sql new file mode 100644 index 000000000..7ff935140 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/13_drill_strict_false.sql @@ -0,0 +1,10 @@ +CREATE OR REPLACE SCHEMA ( + varchar_col2 VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/varchar_13` +PROPERTIES ('drill.strict' = 'false'); +SET `store.table.use_schema_file` = true; +--@test +SELECT + * +FROM dfs.drillTestDir.`table_schema/varchar_13`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/14_drill_strict_default.e_tsv b/framework/resources/Functional/table_schema/data/14_drill_strict_default.e_tsv new file mode 100644 index 000000000..4eb30230b --- /dev/null +++ b/framework/resources/Functional/table_schema/data/14_drill_strict_default.e_tsv @@ -0,0 +1,12 @@ +line1 1 line1 +line2 2 line2 +|_| 3 |_| +|__| 4 |__| +' 5 ' +; 6 ; +. 7 . +` 8 ` +`` 9 `` +;select 10 ;select +';select 11 ';select +`;select 12 `;select diff --git a/framework/resources/Functional/table_schema/data/14_drill_strict_default.sql b/framework/resources/Functional/table_schema/data/14_drill_strict_default.sql new file mode 100644 index 000000000..70b900a09 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/14_drill_strict_default.sql @@ -0,0 +1,9 @@ +CREATE OR REPLACE SCHEMA ( + varchar_col2 VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/varchar_14`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + * +FROM dfs.drillTestDir.`table_schema/varchar_14`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/15_timestamp.e_tsv b/framework/resources/Functional/table_schema/data/15_timestamp.e_tsv new file mode 100644 index 000000000..c56aac7d5 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/15_timestamp.e_tsv @@ -0,0 +1,5 @@ +1970-01-01 01:00:00.0 TIMESTAMP 1970-01-01 00:00:00.0 +1970-01-01 01:00:00.0 TIMESTAMP 1970-01-01 01:00:00.0 +2019-02-19 19:18:11.0 TIMESTAMP 2019-02-19 14:18:11.0 +10000-01-01 22:59:59.0 TIMESTAMP 9999-12-31 23:59:59.0 +1970-01-01 01:00:00.0 TIMESTAMP 1970-01-01 01:00:00.0 diff --git a/framework/resources/Functional/table_schema/data/15_timestamp.sql b/framework/resources/Functional/table_schema/data/15_timestamp.sql new file mode 100644 index 000000000..91cdb428c --- /dev/null +++ b/framework/resources/Functional/table_schema/data/15_timestamp.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + timestamp_col TIMESTAMP, + varchar_timestamp_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/timestamp`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + timestamp_col, + sqlTypeOf(timestamp_col), + CAST(varchar_timestamp_col as TIMESTAMP) +FROM dfs.drillTestDir.`table_schema/timestamp`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/16_date.e_tsv b/framework/resources/Functional/table_schema/data/16_date.e_tsv new file mode 100644 index 000000000..50ae50837 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/16_date.e_tsv @@ -0,0 +1,7 @@ +0001-12-31 DATE 2001-12-31 +0001-01-01 DATE 2001-01-01 +0999-02-03 DATE 0999-02-03 +1969-01-01 DATE 1969-01-01 +1970-01-01 DATE 1970-01-01 +2019-02-19 DATE 2019-02-19 +9999-12-31 DATE 9999-12-31 diff --git a/framework/resources/Functional/table_schema/data/16_date.sql b/framework/resources/Functional/table_schema/data/16_date.sql new file mode 100644 index 000000000..89ef4e1ec --- /dev/null +++ b/framework/resources/Functional/table_schema/data/16_date.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + date_col DATE, + varchar_date_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/date`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + date_col, + sqlTypeOf(date_col), + CAST(varchar_date_col as date) +FROM dfs.drillTestDir.`table_schema/date`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/17_date_custom_format.e_tsv b/framework/resources/Functional/table_schema/data/17_date_custom_format.e_tsv new file mode 100644 index 000000000..8c237302f --- /dev/null +++ b/framework/resources/Functional/table_schema/data/17_date_custom_format.e_tsv @@ -0,0 +1,8 @@ +2200-01-10 DATE 2200-01-10 +1100-01-01 DATE 1100-01-01 +9900-01-10 DATE 9900-01-10 +2200-01-22 DATE 2200-01-22 +1100-01-30 DATE 1100-01-30 +1000-02-11 DATE 1000-02-11 +0100-01-31 DATE 0100-01-31 +0001-03-07 DATE 0001-03-07 diff --git a/framework/resources/Functional/table_schema/data/17_date_custom_format.sql b/framework/resources/Functional/table_schema/data/17_date_custom_format.sql new file mode 100644 index 000000000..f18d21dda --- /dev/null +++ b/framework/resources/Functional/table_schema/data/17_date_custom_format.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + date_format_col DATE format 'CC+MMM DD', + varchar_date_format_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/date_custom_format`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + date_format_col, + sqlTypeOf(date_format_col), + TO_DATE(varchar_date_format_col, 'CC+MMM DD') +FROM dfs.drillTestDir.`table_schema/date_custom_format`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/18_time.e_tsv b/framework/resources/Functional/table_schema/data/18_time.e_tsv new file mode 100644 index 000000000..56db9eb94 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/18_time.e_tsv @@ -0,0 +1,16 @@ +15:20:30 TIME 15:20:30 +00:00:00 TIME 00:00:00 +23:59:59 TIME 23:59:59 +01:01:01 TIME 01:01:01 +01:01:01 TIME 01:01:01 +01:01:01 TIME 01:01:01 +01:01:01 TIME 01:01:01 +01:01:01 TIME 01:01:01 +01:01:01.100 TIME 01:01:01.100 +01:01:01 TIME 01:01:01 +01:01:10 TIME 01:01:10 +01:01:01.100 TIME 01:01:01.100 +01:01:01.999 TIME 01:01:01.999 +01:01:01.999 TIME 01:01:01.999 +01:01:01.999 TIME 01:01:01.999 +01:01:01.998 TIME 01:01:01.998 diff --git a/framework/resources/Functional/table_schema/data/18_time.sql b/framework/resources/Functional/table_schema/data/18_time.sql new file mode 100644 index 000000000..f5a307713 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/18_time.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + time_col TIME, + varchar_time_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/time`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + time_col, + sqlTypeOf(time_col), + CAST(varchar_time_col as TIME) +FROM dfs.drillTestDir.`table_schema/time`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/19_time_custom_format.e_tsv b/framework/resources/Functional/table_schema/data/19_time_custom_format.e_tsv new file mode 100644 index 000000000..f7c161448 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/19_time_custom_format.e_tsv @@ -0,0 +1,10 @@ +13:02:00.099 TIME 13:02:00.099 +11:00:59.990 TIME 11:00:59.990 +12:02:01.909 TIME 12:02:01.909 +03:10:01 TIME 03:10:01 +07:59:10.900 TIME 07:59:10.900 +01:36:22.111 TIME 01:36:22.111 +15:12:50.999 TIME 15:12:50.999 +16:29:01.564 TIME 16:29:01.564 +15:02:02.543 TIME 15:02:02.543 +22:01:12.121 TIME 22:01:12.121 diff --git a/framework/resources/Functional/table_schema/data/19_time_custom_format.sql b/framework/resources/Functional/table_schema/data/19_time_custom_format.sql new file mode 100644 index 000000000..1d9ddd33b --- /dev/null +++ b/framework/resources/Functional/table_schema/data/19_time_custom_format.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + time_format_col TIME format 'h:m_s-SSS a', + varchar_time_format_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/time_custom_format`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + time_format_col, + sqlTypeOf(time_format_col), + TO_TIME(varchar_time_format_col, 'h:m_s-SSS a') +FROM dfs.drillTestDir.`table_schema/time_custom_format`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/20_interval_extended.e_tsv b/framework/resources/Functional/table_schema/data/20_interval_extended.e_tsv new file mode 100644 index 000000000..c5b045f50 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/20_interval_extended.e_tsv @@ -0,0 +1,63 @@ +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +PT0S INTERVAL PT0S PT0S +P12M INTERVAL P1Y PT0S +P13M INTERVAL P1Y1M PT0S +P13M1D INTERVAL P1Y1M P1D +P13M1DT3600S INTERVAL P1Y1M P1DT3600S +P13M1DT3660S INTERVAL P1Y1M P1DT3660S +P13M1DT3661S INTERVAL P1Y1M P1DT3661S +P1M INTERVAL P1M PT0S +P1M1D INTERVAL P1M P1D +P1M1DT3600S INTERVAL P1M P1DT3600S +P1M1DT3660S INTERVAL P1M P1DT3660S +P1M1DT3661S INTERVAL P1M P1DT3661S +P1D INTERVAL PT0S P1D +P1DT3600S INTERVAL PT0S P1DT3600S +P1DT3660S INTERVAL PT0S P1DT3660S +P1DT3661S INTERVAL PT0S P1DT3661S +PT3600S INTERVAL PT0S PT3600S +PT3660S INTERVAL PT0S PT3660S +PT3661S INTERVAL PT0S PT3661S +PT60S INTERVAL PT0S PT60S +PT61S INTERVAL PT0S PT61S +PT1S INTERVAL PT0S PT1S +P119988M INTERVAL P9999Y PT0S +P120000M INTERVAL P10000Y PT0S +P120000M28D INTERVAL P10000Y P28D +P120000M28DT82800S INTERVAL P10000Y P28DT82800S +P120000M28DT86340S INTERVAL P10000Y P28DT86340S +P120000M28DT86399S INTERVAL P10000Y P28DT86399S +P12M INTERVAL P1Y PT0S +P12M28D INTERVAL P1Y P28D +P12M28DT82800S INTERVAL P1Y P28DT82800S +P12M28DT86340S INTERVAL P1Y P28DT86340S +P12M28DT86399S INTERVAL P1Y P28DT86399S +P28D INTERVAL PT0S P28D +P28DT82800S INTERVAL PT0S P28DT82800S +P28DT86340S INTERVAL PT0S P28DT86340S +P28DT86399S INTERVAL PT0S P28DT86399S +PT82800S INTERVAL PT0S PT82800S +PT86340S INTERVAL PT0S PT86340S +PT86399S INTERVAL PT0S PT86399S +PT3540S INTERVAL PT0S PT3540S +PT3599S INTERVAL PT0S PT3599S +PT59S INTERVAL PT0S PT59S diff --git a/framework/resources/Functional/table_schema/data/20_interval_extended.sql b/framework/resources/Functional/table_schema/data/20_interval_extended.sql new file mode 100644 index 000000000..ff7ba66ae --- /dev/null +++ b/framework/resources/Functional/table_schema/data/20_interval_extended.sql @@ -0,0 +1,13 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL YEAR), + CAST(varchar_interval_col as INTERVAL DAY) +FROM dfs.drillTestDir.`table_schema/interval`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/21_interval_extended_year.e_tsv b/framework/resources/Functional/table_schema/data/21_interval_extended_year.e_tsv new file mode 100644 index 000000000..3ba44d007 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/21_interval_extended_year.e_tsv @@ -0,0 +1,63 @@ +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +PT0S INTERVAL YEAR TO MONTH PT0S PT0S +P1Y INTERVAL YEAR TO MONTH P1Y PT0S +P1Y1M INTERVAL YEAR TO MONTH P1Y1M PT0S +P1Y1M INTERVAL YEAR TO MONTH P1Y1M P1D +P1Y1M INTERVAL YEAR TO MONTH P1Y1M P1DT3600S +P1Y1M INTERVAL YEAR TO MONTH P1Y1M P1DT3660S +P1Y1M INTERVAL YEAR TO MONTH P1Y1M P1DT3661S +P1M INTERVAL YEAR TO MONTH P1M PT0S +P1M INTERVAL YEAR TO MONTH P1M P1D +P1M INTERVAL YEAR TO MONTH P1M P1DT3600S +P1M INTERVAL YEAR TO MONTH P1M P1DT3660S +P1M INTERVAL YEAR TO MONTH P1M P1DT3661S +PT0S INTERVAL YEAR TO MONTH PT0S P1D +PT0S INTERVAL YEAR TO MONTH PT0S P1DT3600S +PT0S INTERVAL YEAR TO MONTH PT0S P1DT3660S +PT0S INTERVAL YEAR TO MONTH PT0S P1DT3661S +PT0S INTERVAL YEAR TO MONTH PT0S PT3600S +PT0S INTERVAL YEAR TO MONTH PT0S PT3660S +PT0S INTERVAL YEAR TO MONTH PT0S PT3661S +PT0S INTERVAL YEAR TO MONTH PT0S PT60S +PT0S INTERVAL YEAR TO MONTH PT0S PT61S +PT0S INTERVAL YEAR TO MONTH PT0S PT1S +P9999Y INTERVAL YEAR TO MONTH P9999Y PT0S +P10000Y INTERVAL YEAR TO MONTH P10000Y PT0S +P10000Y INTERVAL YEAR TO MONTH P10000Y P28D +P10000Y INTERVAL YEAR TO MONTH P10000Y P28DT82800S +P10000Y INTERVAL YEAR TO MONTH P10000Y P28DT86340S +P10000Y INTERVAL YEAR TO MONTH P10000Y P28DT86399S +P1Y INTERVAL YEAR TO MONTH P1Y PT0S +P1Y INTERVAL YEAR TO MONTH P1Y P28D +P1Y INTERVAL YEAR TO MONTH P1Y P28DT82800S +P1Y INTERVAL YEAR TO MONTH P1Y P28DT86340S +P1Y INTERVAL YEAR TO MONTH P1Y P28DT86399S +PT0S INTERVAL YEAR TO MONTH PT0S P28D +PT0S INTERVAL YEAR TO MONTH PT0S P28DT82800S +PT0S INTERVAL YEAR TO MONTH PT0S P28DT86340S +PT0S INTERVAL YEAR TO MONTH PT0S P28DT86399S +PT0S INTERVAL YEAR TO MONTH PT0S PT82800S +PT0S INTERVAL YEAR TO MONTH PT0S PT86340S +PT0S INTERVAL YEAR TO MONTH PT0S PT86399S +PT0S INTERVAL YEAR TO MONTH PT0S PT3540S +PT0S INTERVAL YEAR TO MONTH PT0S PT3599S +PT0S INTERVAL YEAR TO MONTH PT0S PT59S diff --git a/framework/resources/Functional/table_schema/data/21_interval_extended_year.sql b/framework/resources/Functional/table_schema/data/21_interval_extended_year.sql new file mode 100644 index 000000000..16c5da798 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/21_interval_extended_year.sql @@ -0,0 +1,13 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL YEAR, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_21`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL YEAR), + CAST(varchar_interval_col as INTERVAL DAY) +FROM dfs.drillTestDir.`table_schema/interval_21`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/22_interval_extended_day.e_tsv b/framework/resources/Functional/table_schema/data/22_interval_extended_day.e_tsv new file mode 100644 index 000000000..d75989498 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/22_interval_extended_day.e_tsv @@ -0,0 +1,63 @@ +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND PT0S PT0S +PT0S INTERVAL DAY TO SECOND P1Y PT0S +PT0S INTERVAL DAY TO SECOND P1Y1M PT0S +P1D INTERVAL DAY TO SECOND P1Y1M P1D +P1DT3600S INTERVAL DAY TO SECOND P1Y1M P1DT3600S +P1DT3660S INTERVAL DAY TO SECOND P1Y1M P1DT3660S +P1DT3661S INTERVAL DAY TO SECOND P1Y1M P1DT3661S +PT0S INTERVAL DAY TO SECOND P1M PT0S +P1D INTERVAL DAY TO SECOND P1M P1D +P1DT3600S INTERVAL DAY TO SECOND P1M P1DT3600S +P1DT3660S INTERVAL DAY TO SECOND P1M P1DT3660S +P1DT3661S INTERVAL DAY TO SECOND P1M P1DT3661S +P1D INTERVAL DAY TO SECOND PT0S P1D +P1DT3600S INTERVAL DAY TO SECOND PT0S P1DT3600S +P1DT3660S INTERVAL DAY TO SECOND PT0S P1DT3660S +P1DT3661S INTERVAL DAY TO SECOND PT0S P1DT3661S +PT3600S INTERVAL DAY TO SECOND PT0S PT3600S +PT3660S INTERVAL DAY TO SECOND PT0S PT3660S +PT3661S INTERVAL DAY TO SECOND PT0S PT3661S +PT60S INTERVAL DAY TO SECOND PT0S PT60S +PT61S INTERVAL DAY TO SECOND PT0S PT61S +PT1S INTERVAL DAY TO SECOND PT0S PT1S +PT0S INTERVAL DAY TO SECOND P9999Y PT0S +PT0S INTERVAL DAY TO SECOND P10000Y PT0S +P28D INTERVAL DAY TO SECOND P10000Y P28D +P28DT82800S INTERVAL DAY TO SECOND P10000Y P28DT82800S +P28DT86340S INTERVAL DAY TO SECOND P10000Y P28DT86340S +P28DT86399S INTERVAL DAY TO SECOND P10000Y P28DT86399S +PT0S INTERVAL DAY TO SECOND P1Y PT0S +P28D INTERVAL DAY TO SECOND P1Y P28D +P28DT82800S INTERVAL DAY TO SECOND P1Y P28DT82800S +P28DT86340S INTERVAL DAY TO SECOND P1Y P28DT86340S +P28DT86399S INTERVAL DAY TO SECOND P1Y P28DT86399S +P28D INTERVAL DAY TO SECOND PT0S P28D +P28DT82800S INTERVAL DAY TO SECOND PT0S P28DT82800S +P28DT86340S INTERVAL DAY TO SECOND PT0S P28DT86340S +P28DT86399S INTERVAL DAY TO SECOND PT0S P28DT86399S +PT82800S INTERVAL DAY TO SECOND PT0S PT82800S +PT86340S INTERVAL DAY TO SECOND PT0S PT86340S +PT86399S INTERVAL DAY TO SECOND PT0S PT86399S +PT3540S INTERVAL DAY TO SECOND PT0S PT3540S +PT3599S INTERVAL DAY TO SECOND PT0S PT3599S +PT59S INTERVAL DAY TO SECOND PT0S PT59S diff --git a/framework/resources/Functional/table_schema/data/22_interval_extended_day.sql b/framework/resources/Functional/table_schema/data/22_interval_extended_day.sql new file mode 100644 index 000000000..09a814709 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/22_interval_extended_day.sql @@ -0,0 +1,13 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL DAY, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_22`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL YEAR), + CAST(varchar_interval_col as INTERVAL DAY) +FROM dfs.drillTestDir.`table_schema/interval_22`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.e_tsv new file mode 100644 index 000000000..87ecdb28c --- /dev/null +++ b/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL PT0S +P1D INTERVAL P1D +P10D INTERVAL P10D +P200D INTERVAL P200D +P7777D INTERVAL P7777D +P9999D INTERVAL P9999D +P99999D INTERVAL P99999D +PT0S INTERVAL PT0S +P-1D INTERVAL P-1D +P-10D INTERVAL P-10D +P-200D INTERVAL P-200D +P-7777D INTERVAL P-7777D +P-9999D INTERVAL P-9999D +P-99999D INTERVAL P-99999D +PT0S INTERVAL PT0S +P1D INTERVAL P1D +P10D INTERVAL P10D +P200D INTERVAL P200D +P7777D INTERVAL P7777D +P9999D INTERVAL P9999D +P99999D INTERVAL P99999D diff --git a/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.sql b/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.sql new file mode 100644 index 000000000..ab5a0a7f7 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/23_interval_day_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_day`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL DAY) +FROM dfs.drillTestDir.`table_schema/interval_day`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/24_interval_day.e_tsv b/framework/resources/Functional/table_schema/data/24_interval_day.e_tsv new file mode 100644 index 000000000..503c76ba9 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/24_interval_day.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL DAY TO SECOND PT0S +P1D INTERVAL DAY TO SECOND P1D +P10D INTERVAL DAY TO SECOND P10D +P200D INTERVAL DAY TO SECOND P200D +P7777D INTERVAL DAY TO SECOND P7777D +P9999D INTERVAL DAY TO SECOND P9999D +P99999D INTERVAL DAY TO SECOND P99999D +PT0S INTERVAL DAY TO SECOND PT0S +P-1D INTERVAL DAY TO SECOND P-1D +P-10D INTERVAL DAY TO SECOND P-10D +P-200D INTERVAL DAY TO SECOND P-200D +P-7777D INTERVAL DAY TO SECOND P-7777D +P-9999D INTERVAL DAY TO SECOND P-9999D +P-99999D INTERVAL DAY TO SECOND P-99999D +PT0S INTERVAL DAY TO SECOND PT0S +P1D INTERVAL DAY TO SECOND P1D +P10D INTERVAL DAY TO SECOND P10D +P200D INTERVAL DAY TO SECOND P200D +P7777D INTERVAL DAY TO SECOND P7777D +P9999D INTERVAL DAY TO SECOND P9999D +P99999D INTERVAL DAY TO SECOND P99999D diff --git a/framework/resources/Functional/table_schema/data/24_interval_day.sql b/framework/resources/Functional/table_schema/data/24_interval_day.sql new file mode 100644 index 000000000..bfeadbc2b --- /dev/null +++ b/framework/resources/Functional/table_schema/data/24_interval_day.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL DAY, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_day_24`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL DAY) +FROM dfs.drillTestDir.`table_schema/interval_day_24`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.e_tsv new file mode 100644 index 000000000..360a64152 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL PT0S +PT3600S INTERVAL PT3600S +PT43200S INTERVAL PT43200S +PT82800S INTERVAL PT82800S +PT86400S INTERVAL P1D +PT720000S INTERVAL P8DT28800S +PT-2067571.072S INTERVAL P324DT3600S +PT1636661.632S INTERVAL P416DT54000S +PT-780852.864S INTERVAL P4166DT54000S +PT0S INTERVAL PT0S +PT-3600S INTERVAL PT-3600S +PT-43200S INTERVAL PT-43200S +PT-82800S INTERVAL PT-82800S +PT-86400S INTERVAL PT-86400S +PT-720000S INTERVAL PT-720000S +PT2067571.072S INTERVAL PT2067571.072S +PT-1636661.632S INTERVAL PT-1636661.632S +PT780852.864S INTERVAL PT780852.864S +PT0S INTERVAL PT0S +PT3600S INTERVAL PT3600S +PT43200S INTERVAL PT43200S +PT82800S INTERVAL PT82800S +PT86400S INTERVAL P1D +PT720000S INTERVAL P8DT28800S +PT-2067571.072S INTERVAL P324DT3600S +PT1636661.632S INTERVAL P416DT54000S +PT-780852.864S INTERVAL P4166DT54000S diff --git a/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.sql b/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.sql new file mode 100644 index 000000000..66faad3c5 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/25_interval_hour_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_hour`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL HOUR) +FROM dfs.drillTestDir.`table_schema/interval_hour`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/26_interval_hour.e_tsv b/framework/resources/Functional/table_schema/data/26_interval_hour.e_tsv new file mode 100644 index 000000000..1f5456cfb --- /dev/null +++ b/framework/resources/Functional/table_schema/data/26_interval_hour.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL DAY TO SECOND PT0S +PT3600S INTERVAL DAY TO SECOND PT3600S +PT43200S INTERVAL DAY TO SECOND PT43200S +PT82800S INTERVAL DAY TO SECOND PT82800S +PT86400S INTERVAL DAY TO SECOND P1D +PT720000S INTERVAL DAY TO SECOND P8DT28800S +PT-2067571.072S INTERVAL DAY TO SECOND P324DT3600S +PT1636661.632S INTERVAL DAY TO SECOND P416DT54000S +PT-780852.864S INTERVAL DAY TO SECOND P4166DT54000S +PT0S INTERVAL DAY TO SECOND PT0S +PT-3600S INTERVAL DAY TO SECOND PT-3600S +PT-43200S INTERVAL DAY TO SECOND PT-43200S +PT-82800S INTERVAL DAY TO SECOND PT-82800S +PT-86400S INTERVAL DAY TO SECOND PT-86400S +PT-720000S INTERVAL DAY TO SECOND PT-720000S +PT2067571.072S INTERVAL DAY TO SECOND PT2067571.072S +PT-1636661.632S INTERVAL DAY TO SECOND PT-1636661.632S +PT780852.864S INTERVAL DAY TO SECOND PT780852.864S +PT0S INTERVAL DAY TO SECOND PT0S +PT3600S INTERVAL DAY TO SECOND PT3600S +PT43200S INTERVAL DAY TO SECOND PT43200S +PT82800S INTERVAL DAY TO SECOND PT82800S +PT86400S INTERVAL DAY TO SECOND P1D +PT720000S INTERVAL DAY TO SECOND P8DT28800S +PT-2067571.072S INTERVAL DAY TO SECOND P324DT3600S +PT1636661.632S INTERVAL DAY TO SECOND P416DT54000S +PT-780852.864S INTERVAL DAY TO SECOND P4166DT54000S diff --git a/framework/resources/Functional/table_schema/data/26_interval_hour.sql b/framework/resources/Functional/table_schema/data/26_interval_hour.sql new file mode 100644 index 000000000..38efc3840 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/26_interval_hour.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL HOUR, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_hour_26`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL HOUR) +FROM dfs.drillTestDir.`table_schema/interval_hour_26`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.e_tsv new file mode 100644 index 000000000..e9ee32667 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL PT0S +PT60S INTERVAL PT60S +PT1800S INTERVAL PT1800S +PT3540S INTERVAL PT3540S +PT3600S INTERVAL PT3600S +PT12000S INTERVAL PT12000S +PT466620S INTERVAL P5DT34620S +PT599940S INTERVAL P6DT81540S +PT1704972.704S INTERVAL P69DT38340S +PT0S INTERVAL PT0S +PT-60S INTERVAL PT-60S +PT-1800S INTERVAL PT-1800S +PT-3540S INTERVAL PT-3540S +PT-3600S INTERVAL PT-3600S +PT-12000S INTERVAL PT-12000S +PT-466620S INTERVAL PT-466620S +PT-599940S INTERVAL PT-599940S +PT-1704972.704S INTERVAL PT-1704972.704S +PT0S INTERVAL PT0S +PT60S INTERVAL PT60S +PT1800S INTERVAL PT1800S +PT3540S INTERVAL PT3540S +PT3600S INTERVAL PT3600S +PT12000S INTERVAL PT12000S +PT466620S INTERVAL P5DT34620S +PT599940S INTERVAL P6DT81540S +PT1704972.704S INTERVAL P69DT38340S diff --git a/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.sql b/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.sql new file mode 100644 index 000000000..a5d46e1f9 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/27_interval_minute_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_minute`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL MINUTE) +FROM dfs.drillTestDir.`table_schema/interval_minute`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/28_interval_minute.e_tsv b/framework/resources/Functional/table_schema/data/28_interval_minute.e_tsv new file mode 100644 index 000000000..ee5c576a5 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/28_interval_minute.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL DAY TO SECOND PT0S +PT60S INTERVAL DAY TO SECOND PT60S +PT1800S INTERVAL DAY TO SECOND PT1800S +PT3540S INTERVAL DAY TO SECOND PT3540S +PT3600S INTERVAL DAY TO SECOND PT3600S +PT12000S INTERVAL DAY TO SECOND PT12000S +PT466620S INTERVAL DAY TO SECOND P5DT34620S +PT599940S INTERVAL DAY TO SECOND P6DT81540S +PT1704972.704S INTERVAL DAY TO SECOND P69DT38340S +PT0S INTERVAL DAY TO SECOND PT0S +PT-60S INTERVAL DAY TO SECOND PT-60S +PT-1800S INTERVAL DAY TO SECOND PT-1800S +PT-3540S INTERVAL DAY TO SECOND PT-3540S +PT-3600S INTERVAL DAY TO SECOND PT-3600S +PT-12000S INTERVAL DAY TO SECOND PT-12000S +PT-466620S INTERVAL DAY TO SECOND PT-466620S +PT-599940S INTERVAL DAY TO SECOND PT-599940S +PT-1704972.704S INTERVAL DAY TO SECOND PT-1704972.704S +PT0S INTERVAL DAY TO SECOND PT0S +PT60S INTERVAL DAY TO SECOND PT60S +PT1800S INTERVAL DAY TO SECOND PT1800S +PT3540S INTERVAL DAY TO SECOND PT3540S +PT3600S INTERVAL DAY TO SECOND PT3600S +PT12000S INTERVAL DAY TO SECOND PT12000S +PT466620S INTERVAL DAY TO SECOND P5DT34620S +PT599940S INTERVAL DAY TO SECOND P6DT81540S +PT1704972.704S INTERVAL DAY TO SECOND P69DT38340S diff --git a/framework/resources/Functional/table_schema/data/28_interval_minute.sql b/framework/resources/Functional/table_schema/data/28_interval_minute.sql new file mode 100644 index 000000000..c194f27d1 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/28_interval_minute.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL MINUTE, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_minute_28`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL MINUTE) +FROM dfs.drillTestDir.`table_schema/interval_minute_28`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.e_tsv new file mode 100644 index 000000000..385471460 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL PT0S +P1M INTERVAL P1M +P10M INTERVAL P10M +P200M INTERVAL P16Y8M +P7777M INTERVAL P648Y1M +P9999M INTERVAL P833Y3M +P99999M INTERVAL P8333Y3M +PT0S INTERVAL PT0S +P-1M INTERVAL P-1M +P-10M INTERVAL P-10M +P-200M INTERVAL P-16Y-8M +P-7777M INTERVAL P-648Y-1M +P-9999M INTERVAL P-833Y-3M +P-99999M INTERVAL P-8333Y-3M +PT0S INTERVAL PT0S +P1M INTERVAL P1M +P10M INTERVAL P10M +P200M INTERVAL P16Y8M +P7777M INTERVAL P648Y1M +P9999M INTERVAL P833Y3M +P99999M INTERVAL P8333Y3M diff --git a/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.sql b/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.sql new file mode 100644 index 000000000..32ddc883f --- /dev/null +++ b/framework/resources/Functional/table_schema/data/29_interval_month_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_month`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL MONTH) +FROM dfs.drillTestDir.`table_schema/interval_month`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/30_interval_month.e_tsv b/framework/resources/Functional/table_schema/data/30_interval_month.e_tsv new file mode 100644 index 000000000..e6458ffa6 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/30_interval_month.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL YEAR TO MONTH PT0S +P1M INTERVAL YEAR TO MONTH P1M +P10M INTERVAL YEAR TO MONTH P10M +P16Y8M INTERVAL YEAR TO MONTH P16Y8M +P648Y1M INTERVAL YEAR TO MONTH P648Y1M +P833Y3M INTERVAL YEAR TO MONTH P833Y3M +P8333Y3M INTERVAL YEAR TO MONTH P8333Y3M +PT0S INTERVAL YEAR TO MONTH PT0S +P-1M INTERVAL YEAR TO MONTH P-1M +P-10M INTERVAL YEAR TO MONTH P-10M +P-16Y-8M INTERVAL YEAR TO MONTH P-16Y-8M +P-648Y-1M INTERVAL YEAR TO MONTH P-648Y-1M +P-833Y-3M INTERVAL YEAR TO MONTH P-833Y-3M +P-8333Y-3M INTERVAL YEAR TO MONTH P-8333Y-3M +PT0S INTERVAL YEAR TO MONTH PT0S +P1M INTERVAL YEAR TO MONTH P1M +P10M INTERVAL YEAR TO MONTH P10M +P16Y8M INTERVAL YEAR TO MONTH P16Y8M +P648Y1M INTERVAL YEAR TO MONTH P648Y1M +P833Y3M INTERVAL YEAR TO MONTH P833Y3M +P8333Y3M INTERVAL YEAR TO MONTH P8333Y3M diff --git a/framework/resources/Functional/table_schema/data/30_interval_month.sql b/framework/resources/Functional/table_schema/data/30_interval_month.sql new file mode 100644 index 000000000..401894970 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/30_interval_month.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL MONTH, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_month_30`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL MONTH) +FROM dfs.drillTestDir.`table_schema/interval_month_30`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.e_tsv new file mode 100644 index 000000000..eae5c28bb --- /dev/null +++ b/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL PT0S +PT1S INTERVAL PT1S +PT30S INTERVAL PT30S +PT59S INTERVAL PT59S +PT60S INTERVAL PT60S +PT200S INTERVAL PT200S +PT7777S INTERVAL PT7777S +PT9999S INTERVAL PT9999S +PT99999S INTERVAL P1DT13599S +PT0S INTERVAL PT0S +PT-1S INTERVAL PT-1S +PT-30S INTERVAL PT-30S +PT-59S INTERVAL PT-59S +PT-60S INTERVAL PT-60S +PT-200S INTERVAL PT-200S +PT-7777S INTERVAL PT-7777S +PT-9999S INTERVAL PT-9999S +PT-99999S INTERVAL PT-99999S +PT0S INTERVAL PT0S +PT1S INTERVAL PT1S +PT30S INTERVAL PT30S +PT59S INTERVAL PT59S +PT60S INTERVAL PT60S +PT200S INTERVAL PT200S +PT7777S INTERVAL PT7777S +PT9999S INTERVAL PT9999S +PT99999S INTERVAL P1DT13599S diff --git a/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.sql b/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.sql new file mode 100644 index 000000000..20a59c0fd --- /dev/null +++ b/framework/resources/Functional/table_schema/data/31_interval_second_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_second`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL SECOND) +FROM dfs.drillTestDir.`table_schema/interval_second`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/32_interval_second.e_tsv b/framework/resources/Functional/table_schema/data/32_interval_second.e_tsv new file mode 100644 index 000000000..396365e27 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/32_interval_second.e_tsv @@ -0,0 +1,27 @@ +PT0S INTERVAL DAY TO SECOND PT0S +PT1S INTERVAL DAY TO SECOND PT1S +PT30S INTERVAL DAY TO SECOND PT30S +PT59S INTERVAL DAY TO SECOND PT59S +PT60S INTERVAL DAY TO SECOND PT60S +PT200S INTERVAL DAY TO SECOND PT200S +PT7777S INTERVAL DAY TO SECOND PT7777S +PT9999S INTERVAL DAY TO SECOND PT9999S +PT99999S INTERVAL DAY TO SECOND P1DT13599S +PT0S INTERVAL DAY TO SECOND PT0S +PT-1S INTERVAL DAY TO SECOND PT-1S +PT-30S INTERVAL DAY TO SECOND PT-30S +PT-59S INTERVAL DAY TO SECOND PT-59S +PT-60S INTERVAL DAY TO SECOND PT-60S +PT-200S INTERVAL DAY TO SECOND PT-200S +PT-7777S INTERVAL DAY TO SECOND PT-7777S +PT-9999S INTERVAL DAY TO SECOND PT-9999S +PT-99999S INTERVAL DAY TO SECOND PT-99999S +PT0S INTERVAL DAY TO SECOND PT0S +PT1S INTERVAL DAY TO SECOND PT1S +PT30S INTERVAL DAY TO SECOND PT30S +PT59S INTERVAL DAY TO SECOND PT59S +PT60S INTERVAL DAY TO SECOND PT60S +PT200S INTERVAL DAY TO SECOND PT200S +PT7777S INTERVAL DAY TO SECOND PT7777S +PT9999S INTERVAL DAY TO SECOND PT9999S +PT99999S INTERVAL DAY TO SECOND P1DT13599S diff --git a/framework/resources/Functional/table_schema/data/32_interval_second.sql b/framework/resources/Functional/table_schema/data/32_interval_second.sql new file mode 100644 index 000000000..e4ef4980c --- /dev/null +++ b/framework/resources/Functional/table_schema/data/32_interval_second.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL SECOND, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_second_32`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL SECOND) +FROM dfs.drillTestDir.`table_schema/interval_second_32`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.e_tsv b/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.e_tsv new file mode 100644 index 000000000..1858f58bd --- /dev/null +++ b/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL PT0S +P12M INTERVAL P1Y +P120M INTERVAL P10Y +P2400M INTERVAL P200Y +P93324M INTERVAL P7777Y +P119988M INTERVAL P9999Y +P1199988M INTERVAL P99999Y +PT0S INTERVAL PT0S +P-12M INTERVAL P-1Y +P-120M INTERVAL P-10Y +P-2400M INTERVAL P-200Y +P-93324M INTERVAL P-7777Y +P-119988M INTERVAL P-9999Y +P-1199988M INTERVAL P-99999Y +PT0S INTERVAL PT0S +P12M INTERVAL P1Y +P120M INTERVAL P10Y +P2400M INTERVAL P200Y +P93324M INTERVAL P7777Y +P119988M INTERVAL P9999Y +P1199988M INTERVAL P99999Y diff --git a/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.sql b/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.sql new file mode 100644 index 000000000..f9193f2c8 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/33_interval_year_to_interval.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_year`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL YEAR) +FROM dfs.drillTestDir.`table_schema/interval_year`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/34_interval_year.e_tsv b/framework/resources/Functional/table_schema/data/34_interval_year.e_tsv new file mode 100644 index 000000000..028fa4090 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/34_interval_year.e_tsv @@ -0,0 +1,21 @@ +PT0S INTERVAL YEAR TO MONTH PT0S +P1Y INTERVAL YEAR TO MONTH P1Y +P10Y INTERVAL YEAR TO MONTH P10Y +P200Y INTERVAL YEAR TO MONTH P200Y +P7777Y INTERVAL YEAR TO MONTH P7777Y +P9999Y INTERVAL YEAR TO MONTH P9999Y +P99999Y INTERVAL YEAR TO MONTH P99999Y +PT0S INTERVAL YEAR TO MONTH PT0S +P-1Y INTERVAL YEAR TO MONTH P-1Y +P-10Y INTERVAL YEAR TO MONTH P-10Y +P-200Y INTERVAL YEAR TO MONTH P-200Y +P-7777Y INTERVAL YEAR TO MONTH P-7777Y +P-9999Y INTERVAL YEAR TO MONTH P-9999Y +P-99999Y INTERVAL YEAR TO MONTH P-99999Y +PT0S INTERVAL YEAR TO MONTH PT0S +P1Y INTERVAL YEAR TO MONTH P1Y +P10Y INTERVAL YEAR TO MONTH P10Y +P200Y INTERVAL YEAR TO MONTH P200Y +P7777Y INTERVAL YEAR TO MONTH P7777Y +P9999Y INTERVAL YEAR TO MONTH P9999Y +P99999Y INTERVAL YEAR TO MONTH P99999Y diff --git a/framework/resources/Functional/table_schema/data/34_interval_year.sql b/framework/resources/Functional/table_schema/data/34_interval_year.sql new file mode 100644 index 000000000..d795b3138 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/34_interval_year.sql @@ -0,0 +1,12 @@ +CREATE OR REPLACE SCHEMA ( + interval_col INTERVAL YEAR, + varchar_interval_col VARCHAR +) FOR TABLE dfs.drillTestDir.`table_schema/interval_year_34`; +SET `store.table.use_schema_file` = true; +--@test +SELECT + interval_col, + sqlTypeOf(interval_col), + CAST(varchar_interval_col as INTERVAL YEAR) +FROM dfs.drillTestDir.`table_schema/interval_year_34`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.e_tsv b/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.e_tsv new file mode 100644 index 000000000..92342a2c1 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.e_tsv @@ -0,0 +1,5 @@ +1.0 DOUBLE NOT NULL +2.0 DOUBLE NOT NULL +777.11 DOUBLE NOT NULL +4.3 DOUBLE NOT NULL +5.0 DOUBLE NOT NULL diff --git a/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.sql b/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.sql new file mode 100644 index 000000000..4c4329941 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/35_table_function_double_nullable.sql @@ -0,0 +1,5 @@ +SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM TABLE (dfs.drillTestDir.`table_schema/nullable_double_8`(schema => 'inline=(nullable_double_col DOUBLE not null default `777.11`)', type => 'text', fieldDelimiter => ',', extractHeader => true)); diff --git a/framework/resources/Functional/table_schema/data/data.json b/framework/resources/Functional/table_schema/data/data.json new file mode 100644 index 000000000..1ea5126c6 --- /dev/null +++ b/framework/resources/Functional/table_schema/data/data.json @@ -0,0 +1,203 @@ +{ + "testId": "CRUD_Drill_schema_file", + "type": "group", + "description": "Testing CRUD for the Drill schema file", + "submit-type": "jdbc", + "categories": [ + "functional" + ], + "dependencies" : ["schema"], + "matrices": [ + { + "query-file": ".*.sql", + "schema": "dfs.drillTestDir", + "output-format": "tsv", + "expected-file": ".*.e_tsv", + "verification-type": [ + "in-memory" + ] + } + ], + "datasources": [ + { + "mode": "cp", + "src": "Datasources/table_schema/integer.csvh", + "dest": "table_schema/integer/integer.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/bigint.csvh", + "dest": "table_schema/bigint/bigint.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/double.csvh", + "dest": "table_schema/double/double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/double_1.csvh", + "dest": "table_schema/double_2_files/double_1.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/double_2.csvh", + "dest": "table_schema/double_2_files/double_2.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_5/nullable_double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_6/nullable_double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_7/nullable_double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_8/nullable_double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/float.csvh", + "dest": "table_schema/float/float.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/decimal.csvh", + "dest": "table_schema/decimal/decimal.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/boolean.csvh", + "dest": "table_schema/boolean/boolean.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/varchar.csvh", + "dest": "table_schema/varchar/varchar.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/varchar.csvh", + "dest": "table_schema/varchar_12/varchar.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/varchar.csvh", + "dest": "table_schema/varchar_13/varchar.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/varchar.csvh", + "dest": "table_schema/varchar_14/varchar.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/timestamp.csvh", + "dest": "table_schema/timestamp/timestamp.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/date.csvh", + "dest": "table_schema/date/date.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/date_custom_format.csvh", + "dest": "table_schema/date_custom_format/date_custom_format.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/time.csvh", + "dest": "table_schema/time/time.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/time_custom_format.csvh", + "dest": "table_schema/time_custom_format/time_custom_format.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval.csvh", + "dest": "table_schema/interval/interval.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval.csvh", + "dest": "table_schema/interval_21/interval.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval.csvh", + "dest": "table_schema/interval_22/interval.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_day.csvh", + "dest": "table_schema/interval_day/interval_day.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_day.csvh", + "dest": "table_schema/interval_day_24/interval_day.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_hour.csvh", + "dest": "table_schema/interval_hour/interval_hour.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_hour.csvh", + "dest": "table_schema/interval_hour_26/interval_hour.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_minute.csvh", + "dest": "table_schema/interval_minute/interval_minute.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_minute.csvh", + "dest": "table_schema/interval_minute_28/interval_minute.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_month.csvh", + "dest": "table_schema/interval_month/interval_month.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_month.csvh", + "dest": "table_schema/interval_month_30/interval_month.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_second.csvh", + "dest": "table_schema/interval_second/interval_second.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_second.csvh", + "dest": "table_schema/interval_second_32/interval_second.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_year.csvh", + "dest": "table_schema/interval_year/interval_year.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/interval_year.csvh", + "dest": "table_schema/interval_year_34/interval_year.csvh" + } + ] +} diff --git a/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.plan b/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.plan new file mode 100644 index 000000000..1cba3d03e --- /dev/null +++ b/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.plan @@ -0,0 +1 @@ +.+schema=\[TupleSchema \[PrimitiveColumnMetadata \[`nullable_double_col` \(FLOAT8:REQUIRED\)\]\]\].+ diff --git a/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.sql.explain b/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.sql.explain new file mode 100644 index 000000000..c6ef2562e --- /dev/null +++ b/framework/resources/Functional/table_schema/plan/double_nullable_file_not_null_schema.sql.explain @@ -0,0 +1,11 @@ +CREATE OR REPLACE SCHEMA ( + nullable_double_col DOUBLE NOT NULL +) FOR TABLE dfs.drillTestDir.`table_schema/nullable_double_plan`; +SET `store.table.use_schema_file` = true; +--@test +EXPLAIN PLAN FOR SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM dfs.drillTestDir.`table_schema/nullable_double_plan`; +RESET `store.table.use_schema_file`; diff --git a/framework/resources/Functional/table_schema/plan/plan.json b/framework/resources/Functional/table_schema/plan/plan.json new file mode 100644 index 000000000..5446658ce --- /dev/null +++ b/framework/resources/Functional/table_schema/plan/plan.json @@ -0,0 +1,33 @@ +{ + "testId": "PLAN_Drill_schema_file", + "type": "group", + "description": "Testing plan for querying the Drill schema file", + "submit-type": "jdbc", + "categories": [ + "functional" + ], + "dependencies" : ["schema"], + "matrices": [ + { + "query-file": ".*.sql.explain", + "schema": "dfs.drillTestDir", + "output-format": "tsv", + "expected-file": ".*.plan", + "verification-type": [ + "regex" + ] + } + ], + "datasources": [ + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_tfunc_plan/nullable_double.csvh" + }, + { + "mode": "cp", + "src": "Datasources/table_schema/nullable_double.csvh", + "dest": "table_schema/nullable_double_plan/nullable_double.csvh" + } + ] +} diff --git a/framework/resources/Functional/table_schema/plan/table_function_double_nullable.plan b/framework/resources/Functional/table_schema/plan/table_function_double_nullable.plan new file mode 100644 index 000000000..fa9ba2f48 --- /dev/null +++ b/framework/resources/Functional/table_schema/plan/table_function_double_nullable.plan @@ -0,0 +1 @@ +.+schema=\[TupleSchema \[PrimitiveColumnMetadata \[`nullable_double_col` \(FLOAT8:REQUIRED\)\], properties: \{drill.default=777.11\}\]\].+ diff --git a/framework/resources/Functional/table_schema/plan/table_function_double_nullable.sql.explain b/framework/resources/Functional/table_schema/plan/table_function_double_nullable.sql.explain new file mode 100644 index 000000000..c73e419c2 --- /dev/null +++ b/framework/resources/Functional/table_schema/plan/table_function_double_nullable.sql.explain @@ -0,0 +1,5 @@ +EXPLAIN PLAN FOR SELECT + nullable_double_col, + sqlTypeOf(nullable_double_col), + modeOf(nullable_double_col) +FROM TABLE (dfs.drillTestDir.`table_schema/nullable_double_tfunc_plan`(schema => 'inline=(nullable_double_col DOUBLE not null default `777.11`)', type => 'text', fieldDelimiter => ',', extractHeader => true));