prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.06k stars 5.38k forks source link

[Native] Plan conversion error: Unexpected token char at (16) #22215

Open ethanyzhang opened 8 months ago

ethanyzhang commented 8 months ago
presto:tpcds_sf1_parquet_partitioned> select 1 from store_sales, date_dim where ss_sold_date_sk = d_date_sk;
Query 20240315_090432_00030_wpvtm failed:  Unexpected token char at (16)
VeloxRuntimeError:  Unexpected token char at (16)
    at Unknown.# 0  _ZN8facebook5velox7process10StackTraceC1Ei(Unknown Source)
    at Unknown.# 1  _ZN8facebook5velox14VeloxExceptionC2EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_(Unknown Source)
    at Unknown.# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKNS1_18VeloxCheckFailArgsET0_(Unknown Source)
    at Unknown.# 3  _ZN8facebook5velox4type6fbhive14HiveTypeParser9parseTypeEv(Unknown Source)
    at Unknown.# 4  _ZN8facebook5velox4type6fbhive14HiveTypeParser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(Unknown Source)
    at Unknown.# 5  _ZN8facebook6presto12_GLOBAL__N_117toHiveTableHandleERKNS0_8protocol11TupleDomainINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSt10shared_ptrINS2_13RowExpressionEEbRKS9_RKSt6vectorINS2_6ColumnESaISL_EERKNS2_11TableHandleERKSt3mapIS9_S9_St4lessIS9_ESaISt4pairISI_S9_EEERKNS0_18VeloxExprConverterERKNS0_10TypeParserE(Unknown Source)
    at Unknown.# 6  _ZN8facebook6presto27VeloxQueryPlanConverterBase16toVeloxQueryPlanERKSt10shared_ptrIKNS0_8protocol13TableScanNodeEERKS2_INS3_14TableWriteInfoEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(Unknown Source)
    at Unknown.# 7  _ZN8facebook6presto27VeloxQueryPlanConverterBase16toVeloxQueryPlanERKSt10shared_ptrIKNS0_8protocol8PlanNodeEERKS2_INS3_14TableWriteInfoEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(Unknown Source)
    at Unknown.# 8  _ZN8facebook6presto27VeloxQueryPlanConverterBase16toVeloxQueryPlanERKNS0_8protocol12PlanFragmentERKSt10shared_ptrINS2_14TableWriteInfoEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(Unknown Source)
    at Unknown.# 9  _ZZN8facebook6presto12TaskResource18createOrUpdateTaskEPN8proxygen11HTTPMessageERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEENKUlRKSB_SH_lE_clESH_SH_l.isra.0(Unknown Source)
    at Unknown.# 10 _ZNSt17_Function_handlerIFSt10unique_ptrIN8facebook6presto8protocol8TaskInfoESt14default_deleteIS4_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESF_lEZNS2_12TaskResource18createOrUpdateTaskEPN8proxygen11HTTPMessageERKSt6vectorISD_SaISD_EEEUlSF_SF_lE_E9_M_invokeERKSt9_Any_dataSF_SF_Ol(Unknown Source)
    at Unknown.# 11 _ZN5folly6detail8function14FunctionTraitsIFvRNS_7futures6detail8CoreBaseEONS_8Executor9KeepAliveIS7_EEPNS_17exception_wrapperEEE7callBigIZNS4_4CoreINS_4UnitEE11setCallbackIZNS4_10FutureBaseISH_E18thenImplementationIZNOS_6FutureISH_E9thenValueIZNS_3viaIZZN8facebook6presto12TaskResource22createOrUpdateTaskImplEPN8proxygen11HTTPMessageERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS13_EERKSt8functionIFSt10unique_ptrINSS_8protocol8TaskInfoESt14default_deleteIS1B_EERKS13_S1G_lEEENKUlSW_RKSX_IS19_INS_5IOBufES1C_IS1L_EESaIS1N_EEPNSU_15ResponseHandlerESt10shared_ptrINSS_4http27CallbackRequestHandlerStateEEE_clESW_S1R_S1T_S1X_EUlvE_EENSN_INS_20isFutureOrSemiFutureIDTclcl7declvalIT_EEEEE5InnerEEES9_OS21_EUlS26_E_EENSN_INS4_19valueCallableResultISH_S21_E10value_typeEEES26_EUlSA_ONS_3TryISH_EEE_NS4_25tryExecutorCallableResultISH_S2F_vEEEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENS2J_6ReturnEE4typeES26_S2J_NS4_18InlineContinuationEEUlSA_S2E_E_EEvS26_OS1U_INS_14RequestContextEES2O_EUlS6_SA_SC_E_EEvS6_SA_SC_RNS1_4DataE(Unknown Source)
    at Unknown.# 12 _ZN5folly6detail8function14FunctionTraitsIFvRNS_7futures6detail8CoreBaseEONS_8Executor9KeepAliveIS7_EEPNS_17exception_wrapperEEEclES6_SA_SC_(Unknown Source)
    at Unknown.# 13 _ZZN5folly7futures6detail8CoreBase10doCallbackEONS_8Executor9KeepAliveIS3_EENS1_5StateEENUlS6_E0_clES6_(Unknown Source)
    at Unknown.# 14 _ZZNO5folly8Executor9KeepAliveIS0_E3addIZNS_7futures6detail8CoreBase10doCallbackEOS2_NS5_5StateEEUlS7_E0_EEvOT_ENUlvE_clEv(Unknown Source)
    at Unknown.# 15 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNOS_8Executor9KeepAliveIS6_E3addIZNS_7futures6detail8CoreBase10doCallbackEOS8_NSB_5StateEEUlSD_E0_EEvOT_EUlvE_EEvRNS1_4DataE(Unknown Source)
    at Unknown.# 16 _ZN5folly6detail8function14FunctionTraitsIFvvEEclEv(Unknown Source)
    at Unknown.# 17 _ZN5folly18ThreadPoolExecutor7runTaskERKSt10shared_ptrINS0_6ThreadEEONS0_4TaskE(Unknown Source)
    at Unknown.# 18 _ZN5folly21CPUThreadPoolExecutor9threadRunESt10shared_ptrINS_18ThreadPoolExecutor6ThreadEE(Unknown Source)
    at Unknown.# 19 _ZSt13__invoke_implIvRMN5folly18ThreadPoolExecutorEFvSt10shared_ptrINS1_6ThreadEEERPS1_JRS4_EET_St21__invoke_memfun_derefOT0_OT1_DpOT2_(Unknown Source)
    at Unknown.# 20 _ZSt8__invokeIRMN5folly18ThreadPoolExecutorEFvSt10shared_ptrINS1_6ThreadEEEJRPS1_RS4_EENSt15__invoke_resultIT_JDpT0_EE4typeEOSC_DpOSD_(Unknown Source)
    at Unknown.# 21 _ZNSt5_BindIFMN5folly18ThreadPoolExecutorEFvSt10shared_ptrINS1_6ThreadEEEPS1_S4_EE6__callIvJEJLm0ELm1EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE(Unknown Source)
    at Unknown.# 22 _ZNSt5_BindIFMN5folly18ThreadPoolExecutorEFvSt10shared_ptrINS1_6ThreadEEEPS1_S4_EEclIJEvEET0_DpOT_(Unknown Source)
    at Unknown.# 23 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallISt5_BindIFMNS_18ThreadPoolExecutorEFvSt10shared_ptrINS7_6ThreadEEEPS7_SA_EEEEvRNS1_4DataE(Unknown Source)
    at Unknown.# 24 0x00000000000c2b23(Unknown Source)
    at Unknown.# 25 start_thread(Unknown Source)
    at Unknown.# 26 clone(Unknown Source)
ethanyzhang commented 8 months ago

false alarm becuase this was using char.

ethanyzhang commented 8 months ago

@aditi-pandit we should still give users a clean error message, this is very confusing.

tdcmeehan commented 8 months ago

@yzhang1991 this is in progress with types support in fusion next.

aditi-pandit commented 8 months ago

@tdcmeehan, @yzhang1991 : This error is in Velox HiveTypeParser beyond the Prestissimo plan conversion. That code has an error category for "Unsupported kind". Ideally we should give that error instead of "Unexpected token". We should take a closer look at this code-path.